From dc0acceabb6a5189974109cfea09f598c2a99d14 Mon Sep 17 00:00:00 2001 From: Akira Ajisaka Date: Fri, 30 Aug 2019 10:13:10 +0900 Subject: [PATCH] YARN-9783. Remove low-level zookeeper test to be able to build Hadoop against zookeeper 3.5.5. Contributed by Mate Szalay-Beko. --- .../registry/secure/TestSecureRegistry.java | 34 ------------------- 1 file changed, 34 deletions(-) diff --git a/hadoop-common-project/hadoop-registry/src/test/java/org/apache/hadoop/registry/secure/TestSecureRegistry.java b/hadoop-common-project/hadoop-registry/src/test/java/org/apache/hadoop/registry/secure/TestSecureRegistry.java index 9d5848ea034..27d32ea9d26 100644 --- a/hadoop-common-project/hadoop-registry/src/test/java/org/apache/hadoop/registry/secure/TestSecureRegistry.java +++ b/hadoop-common-project/hadoop-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();