You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@helix.apache.org by GitBox <gi...@apache.org> on 2021/02/04 07:50:47 UTC

[GitHub] [helix] kaisun2000 commented on issue #1630: Fix flaky test TestCrushAutoRebalanceNonRack. testLackEnoughInstances

kaisun2000 commented on issue #1630:
URL: https://github.com/apache/helix/issues/1630#issuecomment-773106700


   It seems that Huizhi tried to fix issue April 2020 by adding 
   ```
         Assert.assertTrue(TestHelper.verify(() -> {
           _gSetupTool.getClusterManagementTool()
               .enableInstance(CLUSTER_NAME, p.getInstanceName(), false);
           return !InstanceValidationUtil.isEnabled(helixDataAccessor, p.getInstanceName())
               && !InstanceValidationUtil.isAlive(helixDataAccessor, p.getInstanceName());
         }, TestHelper.WAIT_DURATION), "Instance should be disabled and offline");
   ```
   
   However, this may not work. The reason is that from test code perspective at the time this instance is disabled and liveinstance gone, it may not reflect the view of controller. Controller may very well see it the instance live not disabled a little bit early and send messages to the instance. 
   
   A better approach seems to be stop controller before disable instance and re-enable controller afterward.
   
   


----------------------------------------------------------------
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:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@helix.apache.org
For additional commands, e-mail: reviews-help@helix.apache.org