Raised the test service-probe timeout and refreshed test DX docs#28759
Raised the test service-probe timeout and refreshed test DX docs#287599larsons wants to merge 1 commit into
Conversation
ref PLA-147 Post-migration audit of running ghost/core's suites locally (sqlite, no services). Test/docs infra only — no production or boot-path changes. - Bumped the adapter service-probe timeout from 400ms to 1s. The probe runs in the vitest main process as the forks spawn, when the event loop is busiest; socket.setTimeout is an inactivity timeout, so under load a running service could miss the 400ms window and be reported down, silently skipping an adapter suite that should run. A down service still resolves instantly (connection refused), so the wider ceiling costs nothing locally. - Fixed three comments that still referenced the deleted test/utils/overrides.js (now test/utils/vitest-setup-db.ts / the vitest setup files). - Testing docs: corrected the test:e2e description (server-side suites, not "API only"), noted suites run on sqlite with adapter auto-skip, and documented the single-file DB watch path (default watch is unit-only).
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (4)
WalkthroughThe pull request makes four small changes to the test infrastructure. In Possibly related PRs
🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
| Command | Status | Duration | Result |
|---|---|---|---|
nx run ghost:test:ci:integration |
✅ Succeeded | 2m 5s | View ↗ |
nx run ghost:test:ci:integration:no-coverage |
✅ Succeeded | 2m 11s | View ↗ |
nx run ghost:test:ci:e2e |
✅ Succeeded | 7m 40s | View ↗ |
nx run ghost:test:ci:e2e:no-coverage |
✅ Succeeded | 6m 33s | View ↗ |
nx run ghost:test:ci:legacy |
✅ Succeeded | 2m 48s | View ↗ |
nx run-many -t test:unit -p ghost |
✅ Succeeded | 30s | View ↗ |
nx run-many -t lint -p ghost-monorepo,ghost |
✅ Succeeded | 41s | View ↗ |
💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗
☁️ Nx Cloud last updated this comment at 2026-06-20 01:32:31 UTC

ref https://linear.app/tryghost/issue/PLA-147
Local-dev hardening from a test-DX audit (ghost/core is fully on Vitest now):
vitest-globalsetup-services.ts). The 400ms ceiling could falsely SKIP an adapter suite whose service is actually up:socket.setTimeoutis an inactivity timeout, and the globalSetup probes while the event loop is briefly blocked (before forks spawn) — a ~500ms block made a live service read as "down". Reproduced the false-skip at 400ms / correct at 1s. When the service is down, connection-refused fires instantly regardless of the ceiling, so this adds zero latency to the skip path.test/utils/overrides.js, and the AGENTS.md Testing section (correctedtest:e2e, noted the sqlite adapter auto-skip, documented single-file DB watch).Verified: unit / integration / single-file / watch all green;
pnpm lint(incl. tsc) clean.Test/docs infrastructure only.