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 <[email protected]>
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

Reply via email to