Repository navigation
test(node-runtime): stop the refused-download test hanging under the bun runner (fix red main) - #30967
Conversation
…stead of faking timers Under CI's bun runner the fake-timer loop ran out of turns before the retries finished, and the test hung to its 30 s timeout.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
ELI5
A test added in #30911 ("says this computer could not reach the download…") hangs for 30 s and fails in CI's bun test shard. That fails
tests node 24 1/5and2/5on every PR that runs them. The download really retries three times, with 1 s, 3 s and 9 s pauses. The test skipped those pauses with fake timers driven by a fixedsetImmediateloop, which runs out of turns under the bun runner before the retries finish.What Changed
PinnedRuntimeMaterializeOptionstakes an optionalretryDelaysMs, passed todownloadVerifiedArchive, which already accepted it. Production callers don't set it, so the default schedule is unchanged.[0, 0, 0]: all four attempts still run, without the pauses. No fake timers.Testing
pnpm test src/main/node-runtime/pinned-runtime-materializer-node.test.ts: 9 passed, three runs in a row.pnpm tc:node: clean.