Set different ZK Server ports for test cases to stablize the test. These 3 test cases are using the same port and reset ZK Server during test. This causes random test failure.
Project: http://git-wip-us.apache.org/repos/asf/helix/repo Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/bd657cf7 Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/bd657cf7 Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/bd657cf7 Branch: refs/heads/master Commit: bd657cf76b287721493c6afe59c3fd9ebca4db20 Parents: a2de7cf Author: Jiajun Wang <[email protected]> Authored: Tue Aug 14 13:51:31 2018 -0700 Committer: Lei Xia <[email protected]> Committed: Fri Sep 21 14:14:49 2018 -0700 ---------------------------------------------------------------------- .../helix/integration/TestCorrectnessOnConnectivityLoss.java | 2 +- .../java/org/apache/helix/integration/TestZkConnectionLost.java | 4 ++-- .../src/test/java/org/apache/helix/util/TestZKClientPool.java | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/helix/blob/bd657cf7/helix-core/src/test/java/org/apache/helix/integration/TestCorrectnessOnConnectivityLoss.java ---------------------------------------------------------------------- diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestCorrectnessOnConnectivityLoss.java b/helix-core/src/test/java/org/apache/helix/integration/TestCorrectnessOnConnectivityLoss.java index f1d72ad..3554207 100644 --- a/helix-core/src/test/java/org/apache/helix/integration/TestCorrectnessOnConnectivityLoss.java +++ b/helix-core/src/test/java/org/apache/helix/integration/TestCorrectnessOnConnectivityLoss.java @@ -44,7 +44,7 @@ import org.testng.annotations.BeforeMethod; import org.testng.annotations.Test; public class TestCorrectnessOnConnectivityLoss { - private static final String ZK_ADDR = "localhost:2189"; + private static final String ZK_ADDR = "localhost:21892"; private ZkServer _zkServer; private String _clusterName; private ClusterControllerManager _controller; http://git-wip-us.apache.org/repos/asf/helix/blob/bd657cf7/helix-core/src/test/java/org/apache/helix/integration/TestZkConnectionLost.java ---------------------------------------------------------------------- diff --git a/helix-core/src/test/java/org/apache/helix/integration/TestZkConnectionLost.java b/helix-core/src/test/java/org/apache/helix/integration/TestZkConnectionLost.java index 282b9f1..4947301 100644 --- a/helix-core/src/test/java/org/apache/helix/integration/TestZkConnectionLost.java +++ b/helix-core/src/test/java/org/apache/helix/integration/TestZkConnectionLost.java @@ -38,7 +38,7 @@ public class TestZkConnectionLost extends TaskTestBase { private final AtomicReference<ZkServer> _zkServerRef = new AtomicReference<>(); - private String _zkAddr = "localhost:2189"; + private String _zkAddr = "localhost:21893"; ClusterSetup _setupTool; ZkClient _zkClient; @@ -75,7 +75,7 @@ public class TestZkConnectionLost extends TaskTestBase { _manager.disconnect(); } stopParticipants(); - + TestHelper.dropCluster(CLUSTER_NAME, _zkClient, _setupTool); _zkClient.close(); http://git-wip-us.apache.org/repos/asf/helix/blob/bd657cf7/helix-core/src/test/java/org/apache/helix/util/TestZKClientPool.java ---------------------------------------------------------------------- diff --git a/helix-core/src/test/java/org/apache/helix/util/TestZKClientPool.java b/helix-core/src/test/java/org/apache/helix/util/TestZKClientPool.java index 222f7b4..12d64e1 100644 --- a/helix-core/src/test/java/org/apache/helix/util/TestZKClientPool.java +++ b/helix-core/src/test/java/org/apache/helix/util/TestZKClientPool.java @@ -35,7 +35,7 @@ public class TestZKClientPool { String testName = "TestZKClientPool"; System.out.println("START " + testName + " at " + new Date(System.currentTimeMillis())); - String zkAddr = "localhost:2189"; + String zkAddr = "localhost:21891"; ZkServer zkServer = TestHelper.startZkServer(zkAddr); ZkClient zkClient = ZKClientPool.getZkClient(zkAddr);
