2424import org .apache .hadoop .registry .client .impl .zk .CuratorService ;
2525import org .apache .hadoop .registry .client .impl .zk .RegistrySecurity ;
2626import org .apache .zookeeper .CreateMode ;
27- import org .apache .zookeeper .Login ;
28- import org .apache .zookeeper .server .ZooKeeperSaslServer ;
29- import org .apache .zookeeper .server .auth .SaslServerCallbackHandler ;
3027import org .junit .After ;
3128import org .junit .Before ;
3229import org .junit .Test ;
3330import org .slf4j .Logger ;
3431import org .slf4j .LoggerFactory ;
3532
36- import javax .security .auth .login .AppConfigurationEntry ;
3733import javax .security .auth .login .LoginContext ;
3834
3935import static org .apache .hadoop .registry .client .api .RegistryConstants .*;
@@ -58,36 +54,6 @@ public void afterTestSecureZKService() throws Throwable {
5854 RegistrySecurity .clearZKSaslClientProperties ();
5955 }
6056
61- /**
62- * this is a cut and paste of some of the ZK internal code that was
63- * failing on windows and swallowing its exceptions
64- */
65- @ Test
66- public void testLowlevelZKSaslLogin () throws Throwable {
67- RegistrySecurity .bindZKToServerJAASContext (ZOOKEEPER_SERVER_CONTEXT );
68- String serverSection =
69- System .getProperty (ZooKeeperSaslServer .LOGIN_CONTEXT_NAME_KEY ,
70- ZooKeeperSaslServer .DEFAULT_LOGIN_CONTEXT_NAME );
71- assertEquals (ZOOKEEPER_SERVER_CONTEXT , serverSection );
72-
73- AppConfigurationEntry entries [];
74- entries = javax .security .auth .login .Configuration .getConfiguration ()
75- .getAppConfigurationEntry (
76- serverSection );
77-
78- assertNotNull ("null entries" , entries );
79-
80- SaslServerCallbackHandler saslServerCallbackHandler =
81- new SaslServerCallbackHandler (
82- javax .security .auth .login .Configuration .getConfiguration ());
83- Login login = new Login (serverSection , saslServerCallbackHandler );
84- try {
85- login .startThreadIfNeeded ();
86- } finally {
87- login .shutdown ();
88- }
89- }
90-
9157 @ Test
9258 public void testCreateSecureZK () throws Throwable {
9359 startSecureZK ();
0 commit comments