Repository navigation
fix(ui): stop the app lifecycle tests racing their 500 ms launch deadline - #383
Merged
Merged
Conversation
…line Every fixture gave startAppServer a 500 ms deadline that also covered starting Node. The wrong_pid and wrong_id tests relied on that deadline expiring after the child wrote its readiness file, so under full-suite load the child could still be starting when the launch timed out, and the test then failed reading started.json (#377). A launch directory is new, so a readiness record with another launch's id or pid can never become valid. startAppServer now rejects it at once instead of waiting for the deadline, the fixtures get a 30 s startup deadline that no test waits for, and a separate test covers the timeout path with a manager that never reports readiness. Closes #377
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 #377.
What changed
Every
app-lifecycle.test.tsfixture gavestartAppServera 500 ms deadline that also covered starting Node. Thewrong_pidandwrong_idtests relied on that deadline expiring after the child wrote its files, so under full-suite load the child could still be starting when the launch timed out, and the test then failed readingstarted.json(ENOENT).startAppServerrejects a readiness record with another launch's id or pid immediately ("Seeded server reported readiness for another launch"). The launch directory is new, so such a record can never become valid. The realapp-server.tswrites an env-less record with its own id and pid first; that still waits as before.Test-support code only; no product change.
Verification
just check: all checks passed (pre-push hook)app-lifecycle.test.ts: 10/10 passing across 3 normal runs and 5 runs with all CPUs saturated. The original flake also did not reproduce on the old code under that synthetic load (it appeared once in a fulljust check), so the fix rests on the code path above rather than a forced reproduction.