fix(flytestdlib): fix race condition in TestCacheFour Enqueue nothing - #7844
Merged
Merged
Conversation
pingsutw
reviewed
Aug 13, 2026
pingsutw
left a comment
Member
There was a problem hiding this comment.
@VedantMadane Thanks for your contribution, could you take a look at the unit test failure?
Sovietaced
approved these changes
Aug 14, 2026
Member
|
@VedantMadane can you rebase to pick up my build fix |
Signed-off-by: Vedant Madane <vedantnm@gmail.com>
VedantMadane
force-pushed
the
fix-flaky-test-cache-four
branch
from
August 14, 2026 09:31
f94db53 to
ec67c82
Compare
Contributor
Author
|
@Sovietaced Rebased onto latest main! Thanks. |
Sovietaced
enabled auto-merge (squash)
August 14, 2026 15:43
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.
Fixes #7843
Summary
Fixes a race condition in
TestCacheFour/Enqueue_nothing(and related subtests inflytestdlib/cache/in_memory_auto_refresh_test.go) wherefakeClock.Step()executed beforeenqueueLoopfinished setting or re-arming its timer.Changes
testingclock.NewFakeClock()instances per subtest inTestCacheFourto prevent timer step cross-talk.assert.Eventually(t, fakeClock.HasWaiters, ...)checks beforefakeClock.Step(...)calls to ensure the backgroundenqueueLoopgoroutine has armed/re-armed its timer.go test -v ./flytestdlib/cache -run TestCacheFourand confirmed all 6 subtests pass consistently.