diff --git a/meta-client/src/main/java/org/apache/helix/metaclient/impl/zk/ZkMetaClient.java b/meta-client/src/main/java/org/apache/helix/metaclient/impl/zk/ZkMetaClient.java index f4594d5d6f..8cc91b9063 100644 --- a/meta-client/src/main/java/org/apache/helix/metaclient/impl/zk/ZkMetaClient.java +++ b/meta-client/src/main/java/org/apache/helix/metaclient/impl/zk/ZkMetaClient.java @@ -666,7 +666,7 @@ public void handleSessionEstablishmentError(Throwable error) throws Exception { } @VisibleForTesting - ZkClient getZkClient() { + ZkClient getZkClient() { return _zkClient; } } diff --git a/meta-client/src/test/java/org/apache/helix/metaclient/recipes/leaderelection/TestLeaderElection.java b/meta-client/src/test/java/org/apache/helix/metaclient/recipes/leaderelection/TestLeaderElection.java index 248643652a..cfd52ebdc6 100644 --- a/meta-client/src/test/java/org/apache/helix/metaclient/recipes/leaderelection/TestLeaderElection.java +++ b/meta-client/src/test/java/org/apache/helix/metaclient/recipes/leaderelection/TestLeaderElection.java @@ -25,8 +25,11 @@ public class TestLeaderElection extends ZkMetaClientTestBase { public static LeaderElectionClient createLeaderElectionClient(String participantName) { MetaClientConfig.StoreType storeType = MetaClientConfig.StoreType.ZOOKEEPER; - MetaClientConfig config = - new MetaClientConfig.MetaClientConfigBuilder<>().setConnectionAddress(ZK_ADDR).setStoreType(storeType).build(); + MetaClientConfig config = new MetaClientConfig.MetaClientConfigBuilder<>().setConnectionAddress(ZK_ADDR) + .setStoreType(storeType) + .setSessionTimeoutInMillis(1 * 60 * 1000) + .setConnectionInitTimeoutInMillis(1 * 60 * 1000) + .build(); return new LeaderElectionClient(config, participantName); }