Skip to content

Journey test teardown waits as long as its setup - #30435

Merged
wmadden merged 1 commit into
mainfrom
journey-teardown-timeout
Sep 27, 2026
Merged

wmadden merged 1 commit into
mainfrom
journey-teardown-timeout

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Linked issue

n/a — small change.

Summary

useDevDatabase in the CLI journey test helpers registers its afterAll teardown on vitest's default 5 s hook timeout while its beforeAll uses timeouts.spinUpPpgDev. Under full-suite load the dev database's close() took longer than 5 s twice in a row on PR #30402 (infer-roundtrip-fidelity.hand-written-check.e2e.test.ts, migration-log.e2e.test.ts), failing files whose tests had all passed; both passed when rerun alone. The sibling helper in test/integration/test/sql-orm-client/integration-helpers.ts already passes timeouts.spinUpPpgDev to its afterAll. This applies the same timeout here.

Scope: one line in test/integration/test/utils/journey-test-helpers.ts. No test logic, no other files.

Testing performed

  • pnpm --filter integration-tests exec vitest run test/cli-journeys/infer-roundtrip-fidelity.hand-written-check.e2e.test.ts test/cli-journeys/migration-log.e2e.test.ts
  • pnpm --filter integration-tests typecheck && pnpm --filter integration-tests lint

Skill update

n/a — internal only.

Checklist

  • All commits are signed off (git commit -s) per the DCO.
  • I read CONTRIBUTING.md and the change is scoped to one logical concern.
  • Tests are updated (n/a — test infrastructure timeout only).
  • The PR title is in TML-NNNN: <sentence-case title> form (no Linear ticket).
  • The Skill update section above is filled in.

Notes for the reviewer

Verification: the diff adds timeouts.spinUpPpgDev as the second argument of one afterAll, mirroring the beforeAll two lines above it.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Tests
    • Updated integration test cleanup to use the same timeout allowance as database startup. This aligns timing for the two database lifecycle steps during automated tests. The change is limited to test execution and does not alter application behavior or add, remove, or change any user-facing features.

useDevDatabase registered its afterAll on vitest's default 5 s hook timeout while beforeAll used timeouts.spinUpPpgDev. Under full-suite load the dev database's close() exceeded 5 s and failed files whose tests had all passed. The sql-orm-client integration helper already passes the same timeout to its afterAll; this does the same here.

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
@wmadden-electric
wmadden-electric requested a review from a team as a code owner September 27, 2026 15:12
@coderabbitai

coderabbitai Bot commented Sep 27, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: prisma/orm/.coderabbit.yml

Review profile: CHILL

Plan: Advanced

Run ID: f4aa927f-7c97-47ca-a55e-e445a1bc4ad6

📥 Commits

Reviewing files that changed from the base of the PR and between 80ed61c and c3365ea.

📒 Files selected for processing (1)
  • test/integration/test/utils/journey-test-helpers.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The database cleanup afterAll hook now uses timeouts.spinUpPpgDev, matching the timeout used by beforeAll. The hook still awaits database cleanup.

Changes

Database cleanup

Layer / File(s) Summary
Set cleanup hook timeout
test/integration/test/utils/journey-test-helpers.ts
The afterAll hook passes timeouts.spinUpPpgDev while awaiting database cleanup.

Priority: ⬇️ Low

Estimated code review effort: 1 (Trivial) | ~3 minutes

Change: Bug fix

Suggested reviewers: sevinf

Merge Risk: ⚪ Minimal · up to c3365

The cleanup timeout now matches setup, and no actionable merge-blocking risk is evident in the supplied change.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: the journey test teardown now uses the same timeout as setup.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
postgres / no-emit 205.77 KB (0%)
postgres / emit 183.59 KB (0%)
mongo / no-emit 189.35 KB (0%)
mongo / emit 168.9 KB (0%)
cf-worker / no-emit 228.62 KB (0%)
cf-worker / emit 203.95 KB (0%)

@pkg-pr-new

pkg-pr-new Bot commented Sep 27, 2026

Copy link
Copy Markdown

Open in StackBlitz

@prisma/orm-extension-arktype-json

npm i https://pkg.pr.new/@prisma/orm-extension-arktype-json@30435

@prisma/orm-extension-middleware-cache

npm i https://pkg.pr.new/@prisma/orm-extension-middleware-cache@30435

@prisma/orm-extension-paradedb

npm i https://pkg.pr.new/@prisma/orm-extension-paradedb@30435

@prisma/orm-extension-pgvector

npm i https://pkg.pr.new/@prisma/orm-extension-pgvector@30435

@prisma/orm-extension-postgis

npm i https://pkg.pr.new/@prisma/orm-extension-postgis@30435

@prisma/orm-extension-supabase

npm i https://pkg.pr.new/@prisma/orm-extension-supabase@30435

@prisma/orm-family-mongo

npm i https://pkg.pr.new/@prisma/orm-family-mongo@30435

@prisma/orm-family-sql

npm i https://pkg.pr.new/@prisma/orm-family-sql@30435

@prisma/orm-framework

npm i https://pkg.pr.new/@prisma/orm-framework@30435

@prisma/orm-mongo

npm i https://pkg.pr.new/@prisma/orm-mongo@30435

@prisma/orm-postgres

npm i https://pkg.pr.new/@prisma/orm-postgres@30435

@prisma/orm-sqlite

npm i https://pkg.pr.new/@prisma/orm-sqlite@30435

@prisma/orm-target-mongo

npm i https://pkg.pr.new/@prisma/orm-target-mongo@30435

@prisma/orm-target-postgres

npm i https://pkg.pr.new/@prisma/orm-target-postgres@30435

@prisma/orm-target-sqlite

npm i https://pkg.pr.new/@prisma/orm-target-sqlite@30435

@prisma/orm-toolchain

npm i https://pkg.pr.new/@prisma/orm-toolchain@30435

commit: c3365ea

@wmadden
wmadden merged commit 5bf8880 into main Sep 27, 2026
14 of 25 checks passed
@wmadden
wmadden deleted the journey-teardown-timeout branch September 27, 2026 15:17
wmadden-electric added a commit that referenced this pull request Sep 27, 2026
Main's squash of #30405 duplicates the slice 5 head this branch already merged, so its conflicts resolve to this branch's side. The merge brings in only #30418 and #30435 (integration-test package scripts, journey teardown timeout, and their lockfile entries).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: willbot <[email protected]>
Signed-off-by: Will Madden <[email protected]>
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.

2 participants