test(dns): stop the debounce burst test racing the scheduler - #1209
Merged
Conversation
The burst subtest fed ten events at a 10ms gap against a 60ms debounce window, which is only six times the margin. A loaded runner overshoots a 10ms sleep easily, and when one gap exceeded the window the debouncer settled mid-burst and emitted twice, failing on macOS CI while the same commit passed on a rerun. The gap narrows and the window widens, so a stall now has to exceed 400ms rather than 60ms to break it. The property under test is unchanged: events arriving closer together than the window still collapse into one emit.
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.
Closes #1208
The burst subtest fed ten events at a 10ms gap against a 60ms debounce window, which is only six times the margin. A loaded runner overshoots a 10ms sleep easily, and when one gap exceeded the window the debouncer settled mid-burst and emitted twice.
That is what happened on release PR #1207: the same commit failed on the push run and passed on the pull_request run, and the failure blocked a merge whose diff touched only the changelog, the README and the version string.
The gap narrows to 5ms and the window widens to 400ms, so a stall now has to exceed 400ms rather than 60ms to break it. The property under test is unchanged, events arriving closer together than the window still collapse into one emit, and the debouncer itself is untouched.
Verified by running the subtest 25 times while twelve concurrent copies of it competed for the CPU, which is the condition that produced the original failure.