Repository navigation
Tests wait on conditions instead of sleeping for them - #277
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <[email protected]>
…e against a starved pool Co-Authored-By: Claude Opus 5.5 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Mpdreamz
force-pushed
the
fix/fragile-timing-tests
branch
from
November 16, 2026 16:05
2eaf079 to
3622adb
Compare
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.
Part of keeping CI free of wall-clock flakes.
Task.sleepof 50/30/20 ms followed by an assertion is now awaitForon the condition (the refusal and cancel written,session/newon the wire,session/cancelsent). New shared helperTests/HeedCoreTests/WaitFor.swift: polls, returns as soon as the condition holds, 30 s deadline that only a broken behaviour reaches.aSlowAnswerTimesOutAndTheServerHearsTheHookLeft: the 200 ms sleep beforegone.idsis now a wait for the server to hear the hook left.Not changed:
theHookStaysFastwas already taken out of the suite by #269 (timings live inmise run bench). The three on-thread bounds inPermissionRoundTripTestsare timed on the hook's own thread against a hook ceiling and passed 200/200 each with 6 CPU hogs per core plus pool-blocking tasks, so they stay as they are.Verified: 200-case parametrized loops under CPU hogs and pool-blocking tasks (before: refusal test failed 1-2 of 200; after: 0 of 1000), mutations (refusal not sent, cancel not sent, wrong close reason,
permissionGonenot called) each fail their test,mise run test,lint,fmt.🤖 Generated with Claude Code