ndimiduk commented on a change in pull request #1102: HBASE-23752: Fix 
remaining test failures from nightly runs
URL: https://github.com/apache/hbase/pull/1102#discussion_r374249918
 
 

 ##########
 File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/security/provider/TestCustomSaslAuthenticationProvider.java
 ##########
 @@ -443,9 +464,23 @@ public static void setupCluster() throws Exception {
         InMemoryServerProvider.class.getName());
     CONF.set(SaslClientAuthenticationProviders.SELECTOR_KEY,
         InMemoryProviderSelector.class.getName());
+    createBaseCluster(UTIL, KEYTAB_FILE, kdc);
+  }
 
-    CLUSTER = createCluster(UTIL, KEYTAB_FILE, kdc);
+  @Before
+  public void setUpBeforeTest() throws Exception {
+    CONF.unset(HConstants.CLIENT_CONNECTION_REGISTRY_IMPL_CONF_KEY);
+    CONF.set(RpcClientFactory.CUSTOM_RPC_CLIENT_IMPL_CONF_KEY, rpcClientImpl);
+    CONF.set(RpcServerFactory.CUSTOM_RPC_SERVER_IMPL_CONF_KEY, rpcServerImpl);
+    if (rpcClientImpl.equals(BlockingRpcClient.class.getName())) {
+      // Set the connection registry to ZKConnectionRegistry since hedging is 
not supported on
+      // blocking rpc clients.
+      CONF.set(HConstants.CLIENT_CONNECTION_REGISTRY_IMPL_CONF_KEY,
+          HConstants.ZK_CONNECTION_REGISTRY_CLASS);
+    }
+    CLUSTER = new LocalHBaseCluster(CONF, 1);
 
 Review comment:
   Sucks that we have to spin the new cluster for every test method. It is not 
possible to do this cluster configuration and initialization in the constructor 
instead?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to