Repository navigation
Cut the 4 slowest browser tests from 391 s to about 100 s - #21
Merged
Merged
Conversation
Most of the time in the 4 slowest browser tests went on deadlines that fail by design: 45 s of attachment budget for each upload fault that never settles, and 5 s of close watching for each refused close. Test-only overrides shorten those waits for the cases that wait them out. Cases that refuse on a first read keep the real budget, so expiry cannot stand in for the refusal they test. The close watch only reads the target list, so its 1 s override has no durable write to leave room for. The 5 s command budget is unchanged. Production values are unchanged: the overrides exist only under cfg(test).
The override also capped the close command, so a slow but successful close could have become a timeout that exercised a different path.
|
EquityBot
pushed a commit
that referenced
this pull request
Nov 1, 2026
* Cut browser test time by shortening deadlines those tests wait out Most of the time in the 4 slowest browser tests went on deadlines that fail by design: 45 s of attachment budget for each upload fault that never settles, and 5 s of close watching for each refused close. Test-only overrides shorten those waits for the cases that wait them out. Cases that refuse on a first read keep the real budget, so expiry cannot stand in for the refusal they test. The close watch only reads the target list, so its 1 s override has no durable write to leave room for. The 5 s command budget is unchanged. Production values are unchanged: the overrides exist only under cfg(test). * Shorten only the watch after a refused close, not the close command The override also capped the close command, so a slow but successful close could have become a timeout that exercised a different path.
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.



Summary
These tests spent most of their time waiting out deadlines that fail by design. Test-only overrides shorten those waits, and only for the cases that wait them out. Production values don't change: the overrides exist only under
cfg(test).attachment_budgetEvidence
Each test alone on Windows with
--test-threads=1:unconfirmed_upload_commands_or_cleanup_never_authorise_close_or_sendcompleted_close_retries_resume_only_the_exact_durable_markersame_process_reconciliation_never_closes_running_or_uncertain_requestsowned_upload_must_reach_readiness_and_cleanup_before_sendAnother run of the same code with temporary logging took 80 s.
recoveryRequired, error text, cleanup warning, close and send counts and the CDP request sequence (repeats collapsed) matchmain. This came from temporary logging, not committed.main, 666 tests, 14 ignored.After: library suite, 666 passed, 0 failed, 14 ignored, on the commit before the final one.
cargo fmt --checkandcargo clippy --all-targets --locked -- -D warningspass;browser_target5 passed,browser_retirement10 passed.Merge danger
Door: two-way. Blast radius: tests
A panicking test could leave an override set for later tests on the same thread, as the existing
TEST_CANCELLED_SEND_SETTLEcan. That only matters in a run that has already failed.Unverified
bridge_doctor_accepts_and_ignores_verbose_like_commanderandlocal_browser_cli_and_mcp_admit_foreground_and_detached_rust_workersfail locally, as they do onmain. No browser is installed here, which is the likely cause (not confirmed).