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 2020/03/10 16:37:27 UTC

[GitHub] [helix] NealSun96 commented on issue #880: Fix testInstancesStoppable_zoneBased

NealSun96 commented on issue #880: Fix testInstancesStoppable_zoneBased
URL: https://github.com/apache/helix/pull/880#issuecomment-597186776
 
 
   This PR is ready to be merged, approved by @narendly
   Final commit message:
   ## Fix testInstancesStoppable_zoneBased ##
   The changes merged in https://github.com/apache/helix/pull/858 broke `testInstancesStoppable_zoneBased`. The test didn't create external views at all, which will encounter exceptions with the new logic. 
   The logic added wasn't supposed to break the tests because the logic is to perform null checks before an if condition that utilizes maps. However, the tests were passing because in the "and" if condition, it failed at `isPartitionMap.containsKey(instanceName)` without accessing the second part of the "and" condition. Therefore, even though the second part could cause a null pointer failure, it was never an issue. The fix is to reorder the logic such that the conditions are performed separately with null checks right before each map access. 

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


With regards,
Apache Git Services

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