Fix flaky test getAllInstances - clean up added instances #2879
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issues
#2836
testGetAllInstances flaky in CI
Description
Test failing due to comparison of in memory instance map vs response from getAllInstances. getAllInstances "instances" value is built from the instance configs in the cluster.
testInstancesAccessor and testPerInstanceAccessor both modify the same cluster -
TestCluster_4
updateInstance in testPerInstanceAccessor adds an instance config but does not remove it. This may lead to the failure in testGetAllInstances because the cluster has an instance config added but the in memory map of _instancesMap does not have an instance added as well
Looking at the logs of previously failed runs vs successful runs. Successful runs have testInstancesAcessor run before testPerInstanceAccessor. Failed runs are the reverse
Tests
N/A
Commits
Code Quality
(helix-style-intellij.xml if IntelliJ IDE is used)