Skip to content

test(project): start the waitdelay deadline once the grandchild holds the pipe - #838

Merged
omartelo merged 1 commit into
mainfrom
test/waitdelay-grandchild-started
Oct 19, 2026
Merged

omartelo merged 1 commit into
mainfrom
test/waitdelay-grandchild-started

Conversation

@omartelo

Copy link
Copy Markdown
Collaborator

TestSubprocessBudgetOutlivesAGrandchild gave the call a fixed 200ms. On
Windows that can run out before the test binary has started twice (child,
then grandchild): the context killed the child before it spawned the
grandchild, Output returned at once, and the cleanup waited ten seconds for
a grandchild that never existed: "the grandchild did not exit once
released" (os-tests on #834, run 39273705110).

The grandchild now writes a holding file once it holds the pipe, and the
test cancels the context at that moment and measures Output from there.
The test changes because it asserted something the contract never
promised: that two process spawns fit in 200ms.

Measured on Linux with the child sleeping 1s before spawning the
grandchild: 3/3 failures before with the same message, 3/3 passes after.
Without cmd.WaitDelay the test still fails (Output blocked 9.99s past the
deadline), and 50/50 runs pass with it.

… the pipe

TestSubprocessBudgetOutlivesAGrandchild gave the call a fixed 200ms. On
Windows that can run out before the test binary has started twice (child,
then grandchild): the context killed the child before it spawned the
grandchild, Output returned at once, and the cleanup waited ten seconds for
a grandchild that never existed: "the grandchild did not exit once
released" (os-tests on #834, run 39273705110).

The grandchild now writes a holding file once it holds the pipe, and the
test cancels the context at that moment and measures Output from there.
The test changes because it asserted something the contract never
promised: that two process spawns fit in 200ms.

Measured on Linux with the child sleeping 1s before spawning the
grandchild: 3/3 failures before with the same message, 3/3 passes after.
Without cmd.WaitDelay the test still fails (Output blocked 9.99s past the
deadline), and 50/50 runs pass with it.
@omartelo
omartelo merged commit 0a34ee6 into main Oct 19, 2026
6 checks passed
@omartelo
omartelo deleted the test/waitdelay-grandchild-started branch October 19, 2026 17:05
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.

1 participant