Skip to content

test: give heavy wrapper tests a Windows timeout budget - #436

Merged
Brooooooklyn merged 1 commit into
mainfrom
fix/flaky-wrapper-windows-timeouts
Oct 15, 2026
Merged

Brooooooklyn merged 1 commit into
mainfrom
fix/flaky-wrapper-windows-timeouts

Conversation

@Brooooooklyn

@Brooooooklyn Brooooooklyn commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Problem

The tests in generateWrapper with migrations bundle Workers and start workerd through Miniflare. Many also start PGlite or a fake MySQL server. On Windows CI runners, disk and process start can stall. Then one of these tests can pass the 20-second unit timeout that Windows uses.

Slowest test in this file, 16 Windows unit runs on main (2026-10-14 to 2026-10-15):

seconds   0    5    10   15   20 (timeout)
          |----|----|----|----|
1.9-4.9   ##                       8 runs
6.5-7.7   ####                     2 runs
8.0-9.5   #####                    4 runs   pg bundle (3), @schema folder (1)
14.4      ########                 1 run    @schema folder
20.1      ##########X              1 run    PostgreSQL cron -> FAIL (run 38639851975)

In that failed run, the file took 82.6 s and a neighbor test took 15.9 s. In 6 of 16 runs the slowest test took 8 s or more.

PR #435 (run 38700489787) also failed in this describe: bundles the mysql2 dependencies that sit in the app node_modules passed 20 s. On main it takes 0.7-2.3 s. In that period, unrelated tests on the same runner were 3-10x slower too.

Per test on main (16 runs):

Test Median Max Runs at 8 s or more
gives a PostgreSQL cron the app database and schema in workerd 3.3 s 20.1 s (timeout) 1
bundles @void/deploy-core when it sits in the app node_modules 1.1 s 15.9 s 1
gives a cron a schema folder through @Schema 2.5 s 14.4 s 3
bundles the pg dependencies that sit in the app node_modules 3.4 s 9.0 s 4
runs a MySQL cron event and queue batch on one connection each 2.7 s 9.0 s 1
runs a PostgreSQL cron event and queue batch on one connection each 4.1 s 7.0 s 0
starts a PostgreSQL cron Worker at a compatibility date without node:fs 2.6 s 6.3 s 0
gives a MySQL cron the app database and schema in workerd 1.7 s 6.0 s 0

All tests that reach 8 s or more are in this describe. Tests in other describes of this file stay under 1 s on main.

Decisions

Decision Reason
Set timeout on the generateWrapper with migrations describe All the slow tests are in this describe. One option covers them without a change to each test.
60 s on Windows only This is 3x the 20 s limit, which covers the 3-10x runner slowdowns that we saw. Other platforms keep the default. This is the same form as other slow Windows tests in the repo.
No change to vite.config.ts or the global testTimeout Other unit tests keep the 20 s limit, so a real hang there still fails fast.
No change to test logic The tests pass when the runner is not stalled. The problem is the time budget, not the behavior.

Known limits

  • This does not make the tests faster. On a slow Windows runner the file can still take more than 80 s.
  • If a runner stalls for more than 60 s in one test, the test still fails.
  • The fast tests in this describe also get the 60 s budget on Windows. They do not need it, but a real hang in one of them takes longer to report.
  • The beforeAll hook that prepares PGlite keeps its own 30 s Windows budget.

Testing

Check Result
vp test run packages/void/test/unit/wrapper.test.ts (macOS) 34 passed, 3.3 s
Describe option reaches each test (temporary check, not committed) Test timeout is 60,000 ms with the option set and 5,000 ms with undefined
vp lint --no-ignore on the file Pass
vp fmt check on the file No changes
Windows CI Label test: windows added

🤖 Generated with Claude Code

https://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufH

The "generateWrapper with migrations" tests bundle Workers and start
workerd. On Windows CI runners they can stall on disk and process start
and pass the 20-second unit timeout. Give that describe a 60-second
budget on Windows only.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufH
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-15T08:08:57.048882Z 56bebf3 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@cloudflare-workers-and-pages

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://fix-flaky-wrapper-windows-timeouts-void-cloud.voidzero-docs.workers.dev (commit 56bebf3)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://8de41da3-void-cloud.voidzero-docs.workers.dev 56bebf3 2026-10-15T08:07:47.457Z Visit the dashboard ↗

@Brooooooklyn
Brooooooklyn merged commit 7b17057 into main Oct 15, 2026
30 checks passed
@Brooooooklyn
Brooooooklyn deleted the fix/flaky-wrapper-windows-timeouts branch October 15, 2026 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant