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 19:47:37 UTC

[GitHub] [helix] pkuwm commented on issue #1630: Flaky test TestCrushAutoRebalanceNonRack. testLackEnoughInstances

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


   > 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.
   
   @kaisun2000 Can you help understand what I fixed may not work?
   
   I believe what I fixed is different from the failure cause you are talking about. What I fixed is to make sure the correct exception is caught and retry is done. It worked and at that time the test was stable with no issue. Please be aware that it fails now because of a different issue. 


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