Repository navigation
test(studio): launch real-Chrome tests like the e2e launcher, bounded by the test budget - #5134
Merged
Merged
Conversation
miguel-heygen
marked this pull request as ready for review
October 6, 2026 23:31
Edit accuracy: accurate 2059 (base branch 2059), smooth 1592 of thoseThe gate passes. Quarantined, measured but not gated (0) |
jrusso1020
approved these changes
Oct 7, 2026
jrusso1020
left a comment
Collaborator
There was a problem hiding this comment.
Checked at da0c89b. Test-only change, CI all green (66 pass, 13 skipped).
- The two browser tests now share
tests/chromeTestUtils.ts. Launch, request interception and runtime injection are byte-equivalent to the copies they replace, apart from two things: the added--disable-dev-shm-usage --disable-gpuflags (the same settests/e2e/chrome-executable.mjsuses) andtimeout: 0. timeout: 0is still bounded: the launch ingsapValueAtPlayheadruns inside a test withtestTimeout: 60_000, and the one ingsapUndoRestoreruns inbeforeAllwithhookTimeout: 60_000.- Keeping
findSystemChrome(rather than the e2eresolveChromeExecutable) keeps the WindowsHYPERFRAMES_BROWSER_PATHpath these tests already relied on.
Non-blocking:
- Two test launchers now carry the same flags: this one and
launchStudioChromeintests/e2e/chrome-executable.mjs, which uses a different resolver and callsprocess.exit(2). Worth folding into one later. - If a launch ever hangs, Vitest fails the test while the pending launch can leave a Chrome process alive until the worker exits.
Rames
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.
What
Main's CI went red after #5115 (run 37539574999).
Test (studio)failed ingsapUndoRestore.browser.test.ts'sbeforeAll:TimeoutError: Timed out after 30000 ms while waiting for the WS endpoint URL to appear in stdout!frompuppeteer.launch.Testonly reports that shard. Nothing #5115 changed runs before that point. Its only change is incore/src/runtime/init.ts.The two studio tests that start their own Chrome under vitest now share one launcher and one page setup in
tests/chromeTestUtils.ts, beside the other test helpers:tests/e2e/chrome-executable.mjs):--no-sandbox --disable-dev-shm-usage --disable-gpu. That means no GPU process, and nothing depends on shared memory.timeout: 0, so the test's own 60 s budget bounds the launch. That budget was set for loaded runners, but puppeteer's 30 s default cut the launch off first.What I could not prove
This is the only Chrome launch timeout in the last 150 CI runs. Under a full studio suite on 4 workers on a loaded Linux box, the launch took 0.2 to 0.3 s. So the failing launch hung rather than ran slowly. Chrome's own output from the failing run isn't in the CI log, so I can't name the cause. This change gives the launch the flags Studio's other launcher already uses and the full test budget. It does not prove the hang cannot come back.
Checks
vite.browser.test.ts: 21/21, 3 runs in a row.--maxWorkers=4: 689 files, 7672 tests pass.dumpio: trueon the launch would put Chrome's own output in the log if it hangs again.No visible change
Test code only: two real-Chrome unit tests and their helper under
packages/studio/tests/. Nothing a Studio user sees changes.Size
Under 100 lines on purpose: it is a lone fix for a red main and should not wait to be bundled with other work.