fix: Try to fix flakes in LookupCoordinatorManagerTest#19309
Open
capistrant wants to merge 1 commit intoapache:masterfrom
Open
fix: Try to fix flakes in LookupCoordinatorManagerTest#19309capistrant wants to merge 1 commit intoapache:masterfrom
capistrant wants to merge 1 commit intoapache:masterfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Noticed
LookupCoordinatorManagerTestas being pretty flakey when looking at CI runs and then running locally on loops. About every ~200 iterations I would get a test fail on the assertion in the teardown. With the proposed change I was able to get multiple runs above 3k iterations without a failure and gave up on waiting.Analysis and solution notes
The per-test try/finally pattern was chosen over a centralized teardown approach (e.g. a class-level field stopped in @after) because each test constructs its manager differently (varying constructors, overridden methods, and config) making a shared field seem maybe awkward. try/finally keeps the lifecycle visible right where start() is called.
Key changed/added classes in this PR
LookupCoordinatorManagerTestThis PR has: