fix(net/local): bound release-boundary settle drain in TestReleaseBroadcastChannel - #4284
Merged
Merged
Conversation
…eBroadcastChannel The settle-window drain added to absorb the expected single straggler tick discarded its count unchecked, so a genuine regression where the ticker fires more than once after release would only be caught by the second, stricter window - not at the settle step itself, where it's easier to diagnose. Assert the settle window sees at most one tick.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Team Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Follow-up to #4283.
That PR fixed
TestReleaseBroadcastChannel's flake (reproduced pre-existing on cleanorigin/reservations-epicat the time, ~2/5 failure rate in isolation - #4279's bug, not introduced by #4283's merge) by absorbing the one straggler tickNewTimeTicker's cancel-vs-elapsed-timer race can let through afterReleaseBroadcastChannel.That fix's settle-window drain discarded its count unchecked, so a genuine regression where the ticker fires more than once after release would only surface at the second, stricter assertion - not at the settle step itself, where the failure is easier to diagnose. This bounds the settle window: at most one straggler, asserted explicitly.
Verified 20/20 locally (
go test ./pkg/net/local/... -run TestReleaseBroadcastChannel -count=1, repeated); fullgo build/go vet/gofmt -lclean.