Fix the unstable test TestZeroReplicaAvoidance. (#603)
Fix the unstable test TestZeroReplicaAvoidance by waiting.
This is a temporary resolution before we fix issue #526. Marked it in the TODO comment so easier for us to remove the wait in batch later.
diff --git a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestZeroReplicaAvoidance.java b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestZeroReplicaAvoidance.java
index bd3f2e1..1a02299 100644
--- a/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestZeroReplicaAvoidance.java
+++ b/helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestZeroReplicaAvoidance.java
@@ -165,6 +165,8 @@
String db = "Test-DB-" + stateModel;
createResourceWithWagedRebalance(CLUSTER_NAME, db, stateModel, partition, replica, replica);
}
+ // TODO remove this sleep after fix https://github.com/apache/helix/issues/526
+ Thread.sleep(1000);
Assert.assertTrue(_clusterVerifier.verifyByPolling(50000L, 100L));
_startListen = true;