Repository navigation
test: remove wall-time and startup assumptions from CLI and MCP tests - #303
Merged
Merged
Conversation
The fake adb in the CLI and MCP tests read the emulator pid with cat. Tests that do not use the real PATH have no cat, so emu kill did nothing and every Android destroy waited the full 30 s exit grace. The fake now reads the pid with the read builtin. A fake Android destroy drops from about 31 s to about 0.35 s. The commands test destroy limit drops from 45 s to 20 s and its cleanup hook timeout from 90 s to 60 s, since no destroy needs the grace now. Closes #296
The auto viewer test asserted that session create returned within 8 s of a fake browser that slept 10 s. Under CPU load the CLI took 13 to 19 s and the test failed. The fake browser now stays open until the test releases it and records when it exits. The test checks that the CLI returned while the browser was still open, then releases it and waits for its exit. Closes #259
Each WireProcess wait had a 5 s bound, and the first one after a spawn also absorbed the server's startup. Server startup took up to 9 s on a loaded host, and most tests also had vitest's 5 s default timeout, so 5 to 10 of 16 tests failed per run under load. The first wait after a spawn, whether a frame read, the readiness wait or an exit wait, now has a 30 s startup budget. Later waits keep the 5 s bound. Each test that spawns the server gets a timeout that covers one startup plus its frame waits per spawn. Closes #274
The stable wait before typing had an 8 s timeout, because a live caret stops blinking after GTK's 10 s blink timeout and would then look stable. On a loaded host each screenshot sample took 3 to 4 s, so the wait timed out with one or two samples. The fixture now also sets gtk-cursor-blink-timeout=600, so a live caret keeps blinking for 10 minutes. The stable wait then proves the blink is off at any timeout, and its timeout rises to 30 s. With the blink turned on, the wait still times out after 30 s. Without the new setting it would pass after about 11 s. Closes #268
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.
Four CLI and MCP test timing bugs fixed in test code only.
#296: both fake adb scripts (CLI and MCP test helpers) used
catto stop the fake emulator, butcatwas not on the fake's PATH. Every Android destroy then waited the full 30 s grace. They now use the shell'sreadbuiltin. A fake destroy went from 31.4 s to 0.34 s, so the commands test destroy limit went from 45 s to 20 s and its cleanup hook timeout from 90 s to 60 s.#259: the viewer mode test asserted the CLI returned within 8 s of wall time. The fake browser now stays open until the test releases it, and records when it exits. The test checks that the CLI returned while the browser was still open, without a wall-time bound.
#274: the MCP stdio conformance helper gave the first wait after a spawn the same 5 s bound as every later frame. That first wait now gets a 30 s startup budget, and later waits keep 5 s.
#268: the live desktop input test waited for a stable caret with an 8 s timeout. That bound existed because GTK stops a caret blinking after 10 s, after which it looks stable. The fixture now sets
gtk-cursor-blink-timeout=600, so a stable result still proves the blink is off, and the timeout went to 30 s.Closes #259
Closes #268
Closes #274
Closes #296
cat~/Artifacts/pickforge-batch3-2026-10-08/worker-C-report.mdcommands.test.tswith the 20 s limit~/Artifacts/pickforge-batch3-2026-10-08/worker-C-report.md~/Artifacts/pickforge-batch3-2026-10-08/worker-C-report.md~/Artifacts/pickforge-batch3-2026-10-08/worker-C-report.md~/Artifacts/pickforge-batch3-2026-10-08/worker-C-report.md~/Artifacts/pickforge-batch3-2026-10-08/259-268-274-296-cli-mcp-test-timing-cov.logQA device pass: skipped. The change is test code only, so there is nothing to drive.