You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by hz...@apache.org on 2021/09/14 18:16:04 UTC
[helix] branch master updated: Fix flaky test testClusterFreezeMode
(#1871)
This is an automated email from the ASF dual-hosted git repository.
hzlu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/helix.git
The following commit(s) were added to refs/heads/master by this push:
new d62cfb1 Fix flaky test testClusterFreezeMode (#1871)
d62cfb1 is described below
commit d62cfb1847e966635144c2fef2029e10cd5299d8
Author: Huizhi Lu <51...@users.noreply.github.com>
AuthorDate: Tue Sep 14 11:15:55 2021 -0700
Fix flaky test testClusterFreezeMode (#1871)
The test fails randomly. Root cause is the test used a random cluster from the clusters set which has super clusters and task cluster, so the cluster could be a task cluster and then the test fails. Freeze mode does not apply to task framework.
This commit fixes it by changing the test cluster name with a fixed name TestClusters_0.
---
.../src/test/java/org/apache/helix/rest/server/TestClusterAccessor.java | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/helix-rest/src/test/java/org/apache/helix/rest/server/TestClusterAccessor.java b/helix-rest/src/test/java/org/apache/helix/rest/server/TestClusterAccessor.java
index 8b8f38a..3bb3c29 100644
--- a/helix-rest/src/test/java/org/apache/helix/rest/server/TestClusterAccessor.java
+++ b/helix-rest/src/test/java/org/apache/helix/rest/server/TestClusterAccessor.java
@@ -1292,7 +1292,7 @@ public class TestClusterAccessor extends AbstractTestClass {
@Test
public void testClusterFreezeMode() throws Exception {
- String cluster = _clusters.iterator().next();
+ String cluster = "TestCluster_0";
HelixDataAccessor dataAccessor =
new ZKHelixDataAccessor(cluster, new ZkBaseDataAccessor<>(_gZkClient));
// Pause not existed