Sfoglia il codice sorgente

YARN-9783. Remove low-level zookeeper test to be able to build Hadoop against zookeeper 3.5.5. Contributed by Mate Szalay-Beko.

(cherry picked from commit dc0acceabb6a5189974109cfea09f598c2a99d14)
Akira Ajisaka 5 anni fa
parent
commit
4a51bd8079

+ 0 - 34
hadoop-yarn-project/hadoop-yarn/hadoop-yarn-registry/src/test/java/org/apache/hadoop/registry/secure/TestSecureRegistry.java

@@ -24,16 +24,12 @@ import org.apache.hadoop.registry.client.impl.zk.ZKPathDumper;
 import org.apache.hadoop.registry.client.impl.zk.CuratorService;
 import org.apache.hadoop.registry.client.impl.zk.RegistrySecurity;
 import org.apache.zookeeper.CreateMode;
-import org.apache.zookeeper.Login;
-import org.apache.zookeeper.server.ZooKeeperSaslServer;
-import org.apache.zookeeper.server.auth.SaslServerCallbackHandler;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.Test;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
-import javax.security.auth.login.AppConfigurationEntry;
 import javax.security.auth.login.LoginContext;
 
 import static org.apache.hadoop.registry.client.api.RegistryConstants.*;
@@ -58,36 +54,6 @@ public class TestSecureRegistry extends AbstractSecureRegistryTest {
     RegistrySecurity.clearZKSaslClientProperties();
   }
 
-  /**
-  * this is a cut and paste of some of the ZK internal code that was
-   * failing on windows and swallowing its exceptions
-   */
-  @Test
-  public void testLowlevelZKSaslLogin() throws Throwable {
-    RegistrySecurity.bindZKToServerJAASContext(ZOOKEEPER_SERVER_CONTEXT);
-    String serverSection =
-        System.getProperty(ZooKeeperSaslServer.LOGIN_CONTEXT_NAME_KEY,
-            ZooKeeperSaslServer.DEFAULT_LOGIN_CONTEXT_NAME);
-    assertEquals(ZOOKEEPER_SERVER_CONTEXT, serverSection);
-
-    AppConfigurationEntry entries[];
-    entries = javax.security.auth.login.Configuration.getConfiguration()
-                                                     .getAppConfigurationEntry(
-                                                         serverSection);
-
-    assertNotNull("null entries", entries);
-
-    SaslServerCallbackHandler saslServerCallbackHandler =
-        new SaslServerCallbackHandler(
-            javax.security.auth.login.Configuration.getConfiguration());
-    Login login = new Login(serverSection, saslServerCallbackHandler);
-    try {
-      login.startThreadIfNeeded();
-    } finally {
-      login.shutdown();
-    }
-  }
-
   @Test
   public void testCreateSecureZK() throws Throwable {
     startSecureZK();