fix(shard-manager): Flaky spectator client unit test#7734
fix(shard-manager): Flaky spectator client unit test#7734gazi-yestemirova merged 5 commits intocadence-workflow:masterfrom
Conversation
Signed-off-by: Gaziza Yestemirova <gaziza@uber.com>
Signed-off-by: Gaziza Yestemirova <gaziza@uber.com>
Signed-off-by: Gaziza Yestemirova <gaziza@uber.com>
🔍 CI failure analysis for 9d22159: The codecov CI job was terminated after exceeding the maximum execution time while running tests, which is unrelated to the PR changes.IssueThe codecov CI job failed with exit code 143, indicating the process was terminated (SIGTERM). Root CauseThe job was running the full test suite with coverage ( Exit code 143 typically indicates the process was killed by CI timeout limits or resource constraints. DetailsThis failure is unrelated to the PR changes. The PR only modifies a single test file:
The test for this package would have run early in the test suite (alphabetically before
This is a transient infrastructure issue, not a problem introduced by this PR. Code Review ✅ ApprovedClean fix for a flaky test - removes the race condition by eliminating the concurrent goroutine and replacing it with deterministic assertions. No issues found. Rules ✅ All requirements metRepository Rules
1 rule not applicable. Show all rules by commenting Tip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
29e2101
into
cadence-workflow:master
What changed?
This PR updates the flaky spectatorclient TestWatchLoopDisabled unit test. It is fixed by removing the racy assertion on Wait() and instead we verify that the disabled loop sleeps periodically and shuts down cleanly.
Why?
Why the test was flaky:
The race was between steps 2 and 3:
How did you test it?
Unit tests with -
go test -v ./service/sharddistributor/client/spectatorclientPotential risks
Low risk since this is a unit test fix
Release notes
N/A
Documentation Changes
N/A
Reviewer Validation
PR Description Quality (check these before reviewing code):
go testinvocation)