Skip to content

test: retry TestWasm when Chrome does not start in time - #584

Open
mafredri wants to merge 3 commits into
masterfrom
mafredri/wasm-chrome-start-retry
Open

mafredri wants to merge 3 commits into
masterfrom
mafredri/wasm-chrome-start-retry

Conversation

@mafredri

Copy link
Copy Markdown
Member

TestWasm fails with websocket url timeout reached when Chrome takes more than 20s to print its DevTools address. chromedp sets that limit, and wasmbrowsertest has no option to raise it. TestWasm now retries on that error, up to 3 attempts. Any other failure still fails at once.

The slow start is Chrome's first start on a fresh runner, not CPU load. On 20 runners the first start took 5.2s to 27.4s, and 3 took over 20s. 416 later starts, 373 of them during go test --race --bench=. ./..., took at most 1.2s.

Failed runs: 38919884888, 40027879058, 40084933854.

Verification
  • Startup timings: run 40302121157, 20 jobs.
  • A local Chrome wrapper stalled the first start for 25s. On master, TestWasm failed at 20.2s with the same error. On this branch, it retried once and passed in 22.1s, and it passed in 2.0s without the stall.
  • ci/lint.sh passed.

🤖 This PR was created with the help of Coder Agents, and will be reviewed by a human. 🏂🏻

chromedp gives Chrome 20s to print its DevTools address, and
wasmbrowsertest has no option to raise that limit. On 20 fresh GitHub
runners the first Chrome start took 5.2s to 27.4s, so TestWasm sometimes
failed with "websocket url timeout reached" before any wasm test ran.
Later starts on the same runners took at most 1.2s, so one retry is
enough in practice.
@mafredri
mafredri marked this pull request as ready for review October 26, 2026 14:27
@mafredri
mafredri enabled auto-merge (squash) October 26, 2026 14:30

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant