fix(test): raise integration-supabase hookTimeout for preflight contention (PP-2on.3) - #1313
Merged
Merged
Conversation
…ntion (PP-2on.3) Preflight runs `test:integration` and `test:integration:supabase` in parallel. Both projects spin up vitest workers that each create their own PGlite (WASM Postgres) instance, so the first-call `getTestDb()` inside `setupTestDb()`'s `beforeAll` competes for CPU/IO. Under that contention, init can exceed the default 10s vitest `hookTimeout`, causing the integration-supabase project to fail intermittently during full preflight — even though the suite passes cleanly when invoked in isolation immediately afterward. Raises `hookTimeout` to 30s for the integration-supabase project only. The underlying init cost is unchanged; this just gives the WASM bring-up enough headroom to complete under parallel pressure. `getTestDb()` remains memoized per worker, so the cost is paid once per worker, not per test file. Verified locally: `pnpm run test:integration:supabase` solo passes in 3.26s; the preflight-shaped parallel block (`npm-run-all --parallel test:integration test:integration:supabase`) passes with integration-supabase at 11.35s wall-clock — past the old 10s default, comfortably inside the new 30s. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Updates to Preview Branch (fix/PP-2on.3-pglite-hooktimeout) ↗︎
Tasks are run on every commit but only new migration files are pushed.
View logs for this Workflow Run ↗︎. |
Contributor
There was a problem hiding this comment.
Pull request overview
Raises the Vitest hook timeout for the integration-supabase project to reduce flaky beforeAll timeouts during preflight, where test:integration and test:integration:supabase run in parallel and contend during PGlite WASM initialization.
Changes:
- Set
hookTimeout: 30000for theintegration-supabaseVitest project. - Documented why the higher timeout is needed under parallel preflight contention.
This was referenced May 15, 2026
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.
Summary
hookTimeouton theintegration-supabasevitest project from the default 10s to 30s, so PGlite WASM init insetupTestDb()'sbeforeAlldoesn't time out when preflight runstest:integrationandtest:integration:supabasein parallel.getTestDb()is memoized per worker, so the cost is paid once per worker regardless of headroom.Root cause
preflightruns the two integration projects withnpm-run-all --parallel, so both spin up vitest workers that each create their own PGlite (WASM Postgres) instance. Under that CPU/IO contention, first-call init ingetTestDb()regularly exceeds the default 10s, causing 4 specs (images.test.ts,issue-filtering.test.ts,issues.test.ts,machine-text-fields.test.ts) to fail withHook timed out in 10000msatsrc/test/setup/pglite.ts:84. The same suite passes cleanly when run solo immediately afterward.Verification
pnpm run test:integration:supabasesolo: 14 files / 105 tests passed in 3.26snpm-run-all --parallel test:integration test:integration:supabase(the exact preflight sub-block): both projects passed; integration-supabase took 11.35s wall-clock — past the old 10s default, comfortably inside the new 30s.pnpm run check: 116 files / 1034 tests, all linters green.Test plan
test:integration:supabasepassespnpm run checkclean🤖 Generated with Claude Code