[conductor] Fix test race condition#13314
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #13314 +/- ##
===========================================
- Coverage 47.03% 43.03% -4.00%
===========================================
Files 927 758 -169
Lines 77983 68221 -9762
Branches 849 0 -849
===========================================
- Hits 36682 29362 -7320
+ Misses 38620 36383 -2237
+ Partials 2681 2476 -205
Flags with carried forward coverage won't be shown. Click here to find out more.
|
0x00101010
commented
Dec 8, 2024
0x00101010
commented
Dec 8, 2024
0x00101010
commented
Dec 8, 2024
0x00101010
commented
Dec 8, 2024
mslipper
approved these changes
Dec 8, 2024
mslipper
approved these changes
Dec 8, 2024
sigma
pushed a commit
that referenced
this pull request
Dec 19, 2024
* Fix conductor test race condition * update * Address shell ci check * rerun CI for non-related issue
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
Fix test race condition.
The race condition happens during shutdown phase instead of during initialization / startup phase.
The deadlock happens when prior tests tries to shutdown conductor, calls
s.conductor.Stop(s.ctx)should've stopped the inner action for loop, and if it was stopped before the last step was executed, then thes.wg.Done()won't be called. However since we're reusing the same wg across tests before this, the next test hangs immediately since the wg starts from 1 instead of 0.This fix creates a new wg for every test so that even if there's issue with prior test, new test would be able to continue working as it should
Tests
Re-enabled prior test
Additional context
Fixes #13276
Metadata