kaisun2000 commented on a change in pull request #1447:
URL: https://github.com/apache/helix/pull/1447#discussion_r500730013
##########
File path:
helix-core/src/test/java/org/apache/helix/integration/rebalancer/TestClusterInMaintenanceModeWhenReachingOfflineInstancesLimit.java
##########
@@ -130,18 +130,24 @@ public void testWithDisabledInstancesLimit() throws
Exception {
admin.enableInstance(CLUSTER_NAME, instance, false);
}
- Thread.sleep(500);
-
- maintenanceSignal =
_dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance());
- Assert.assertNull(maintenanceSignal);
+ boolean result = TestHelper.verify(() -> {
+ MaintenanceSignal ms =
_dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance());
+ return ms == null;
+ }, TestHelper.WAIT_DURATION);
+ Assert.assertTrue(result);
String instance = _participants.get(i).getInstanceName();
admin.enableInstance(CLUSTER_NAME, instance, false);
- Thread.sleep(500);
- maintenanceSignal =
_dataAccessor.getProperty(_dataAccessor.keyBuilder().maintenance());
- Assert.assertNotNull(maintenanceSignal);
- Assert.assertNotNull(maintenanceSignal.getReason());
+ ZkHelixClusterVerifier clusterVerifier1 =
Review comment:
changed to clusterVerifier. there is only 1 verifier in this test case.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]