From da848b9d29fcabc7c23ed30651ac321007fec4d9 Mon Sep 17 00:00:00 2001 From: xyuanlu Date: Tue, 11 Jun 2024 10:19:04 -0700 Subject: [PATCH] test --- .../org/apache/helix/metaclient/impl/zk/ZkMetaClient.java | 2 +- .../recipes/leaderelection/TestLeaderElection.java | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) 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); }