Repository navigation
test(void): give the db request pool PGlite setup a Windows hook budget - #431
Merged
Merged
Conversation
The PostgreSQL setup in db-request-pool.test.ts starts PGlite inside beforeAll with the default 10s hook timeout. A cold PGlite WASM start can take longer than that on Windows CI, so the hook timed out. Wait for PGlite inside the hook and give it 30s on Windows, as runner-pg.test.ts and db-export-roundtrip.test.ts already do. Query and test deadlines stay unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufH
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-db-request-pool-windows-hook-void-cloud.voidzero-docs.workers.dev (commit c5fa4af)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
cpojer
pushed a commit
that referenced
this pull request
Oct 14, 2026
) ## Problem `wrapper.test.ts > generateWrapper with migrations > bundles the pg dependencies that sit in the app node_modules` timed out on Linux CI ([job](https://github.com/voidzero-dev/void/actions/runs/38611395137/job/116015385533)): 5108 ms against the 5 s test deadline of the `unit-pglite` project. Each `new PGlite()` runs initdb. That is about 0.7 s locally and 4–5× that on CI, and every PostgreSQL test in this block paid it inside its own deadline: ``` CI (ubuntu, unit-pglite) time pg bundle test (first PGlite) 5108 ms ✗ PostgreSQL cron tests 2206–3638 ms MySQL tests (Miniflare, no PGlite) 582–606 ms ``` ## Fix Same pattern as #431: pay the one-time cost in a hook with its own budget. ``` before: test ─▶ new PGlite() ─▶ initdb (seconds on CI) ─▶ query after: beforeAll ─▶ initdb once ─▶ dumpDataDir() (10 s hook budget, 30 s on Windows) test ─▶ new PGlite({ loadDataDir }) ─▶ query (~0.1 s, fresh empty database) ``` Each test still gets its own fresh PGlite instance, so isolation does not change. No test deadline changes. ## Result (local, `--project unit-pglite`, same file) ``` before after pg bundle test 912–984 ms 185–326 ms PostgreSQL crons 697–981 ms 188–401 ms file total 5.7–6.6 s 3.2–4.7 s ``` Under heavy local load (load average 40–88), the pg bundle test went from 1656–2891 ms to 511–635 ms. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufH Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Problem
packages/void/test/unit/db-request-pool.test.tsfailed on Windows CI (PR #424,test (windows-latest, unit)):What this PR changes
The hook waits for
pglite.waitReadyand gets 30s on Windows.runner-pg.test.tsanddb-export-roundtrip.test.tsuse the same pattern. Query and test deadlines stay unchanged.Testing
vp test run packages/void/test/unit/db-request-pool.test.ts(macOS)test: windows)🤖 Generated with Claude Code
https://claude.ai/code/session_0123r5HnanmW2VUrZ7VWDufH