test: let session C release session A instead of a 3 s timer - #283
Merged
Merged
Conversation
The cross-session parallelism test unblocked A on a wall-clock timer and asserted C had written before it fired; on a slow CI runner the dispatch of C could land after the timer and the test went red (three times this week, issue #173). C's own write now releases A, so the ordering is a state transition: if C were serialized behind A, A would hit its idle timeout and resultA.ok would be false. Both waits become ceilings, and a mutation that stops C from releasing A makes the test fail as intended.
Merged
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 #173 (the suite depends on the real clock). This is the one timing test that went red on CI three times this week (
test (20, windows-2022), #279 and earlier), always green on rerun.Why
session serialization: two triggers on different sessions still run in parallelunblocked session A withsetTimeout(3000)and asserted that C had written before that fired. On a slow runner C's dispatch could land after 3 s: the assertion measured the host, not the watcher.What
C's own
\rwrite releases A. The ordering is now a state transition: if the watcher serialized C behind A, A would hit its idle timeout (3 s) andresultA.okwould be false, with a message saying so. The twowaitForFilewaits become ceilings (scaleUp(10000)), not measurements. The test now takes ~120 ms instead of 3 s.Proof
resultA.okwith the new message; reverted.task checkgreen (hook).