Skip to content

test(dns): stop the debounce burst test racing the scheduler - #1209

Merged
geodro merged 2 commits into
mainfrom
fix/flaky-debounce-test
Jul 28, 2026
Merged

test(dns): stop the debounce burst test racing the scheduler#1209
geodro merged 2 commits into
mainfrom
fix/flaky-debounce-test

Conversation

@geodro

@geodro geodro commented Jul 28, 2026

Copy link
Copy Markdown
Member

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.

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.
@geodro
geodro requested a review from a team as a code owner July 28, 2026 10:23
@geodro
geodro merged commit a093925 into main Jul 28, 2026
3 checks passed
@geodro
geodro deleted the fix/flaky-debounce-test branch July 28, 2026 12:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Flaky debounce test blocks CI on macOS

1 participant