composer-draft-wrap test: share a page pool so the file fits the 120 s limit
Fixes the webviews shard timeout in test/composer-draft-wrap.test.ts ("file exceeded its 120 s limit"). This is the same cause as composer-type-scale (#23450), not a flake.
Cause: each of the 32 cases opened its own page and context, and a fresh page refetches about 700 gallery modules. Run one after another after the Vite warm-up, the file took longer than CMUX_WEB_TEST_FILE_TIMEOUT (120 s).
Fix: the same as #23450.
- The cases run through a 4-page FIFO pool started in
beforeAll. Each test awaits its own result, and the assertions are unchanged. - The two fixed 50 ms sleeps now wait for a painted frame (
installPaintedFrames/cmuxPaintFrame). That drops the file's 4-wait row fromfixed-waits-baseline.tsv.
Timings (Linux, Chromium plus WebKit, wall time including Vite and browser startup):
| wall | result | |
|---|---|---|
| base, alone | 149 s, 153 s (instrumented: warm-up done at 39.8 s, then 32 tests at 2.6โ5.7 s each, 156.7 s total) | 32/32, over the 120 s limit |
| this PR, alone | 82 s, 76 s, 76 s | 32/32 |
| this PR, 16 CPU spinners (load 84 on 32 cores) | 130 s | 32/32 |
bunx vp check and check:fixed-waits pass locally. check:browser-lanes fails on base at diff-paint-perf.test.ts:107, a file this PR doesn't touch.
Agent session: huge-blue
๐ค Generated with Claude Code
Need help on this PR? Tag @codesmith-bot with what you need.
Summary by cubic
Fixes the composer-draft-wrap.test.ts timeout (file exceeded its 120 s limit) by running the 32 cases through a shared 4-page pool instead of opening a fresh page per test.
Bug Fixes
- A fresh page refetches ~700 gallery modules, so 32 sequential pages after Vite's warm-up took 149โ157 s; the pool runs them in parallel with assertions unchanged.
- The two fixed 50 ms sleeps now wait for a painted frame, which also drops the file's row from
fixed-waits-baseline.tsv. - Wall time drops to about 76โ82 s alone and 130 s under CPU load, with all 32 cases passing.