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.
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 @@
@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