[quarantine] settings.spec.ts — signup→dashboard 500 timing flake #52

Closed
opened 2026-08-05 02:26:47 +00:00 by Mark · 0 comments
Owner

Quarantined under Mark/nodedesk#49 (Phase 2 quality gates).

Test location

  • File: tests/settings.spec.ts
  • Test: "@smoke settings page loads with user info" (lines 4-11)

Reproduction

npm run test:e2e:all -- tests/settings.spec.ts

Note: Flaky — may pass on warm starts, fails on cold starts.

Failure mode

After clicking "Start trial" in tests/helpers.ts, the redirect to /app times out at 15s and renders Next's error page: This page couldn't load — A server error occurred (ERROR 309949775).

Root cause

Cold-start DB/connection race in the production server started by Playwright. The webServer timeout is 120s, but the signup redirect budget in helpers.ts is only 15s. On a slow runner, the first request to /app hits a 500 before the DB connection pool warms up. The waitForLoadState("networkidle") usage (9 instances in helpers.ts, flagged in audit §3.9) compounds this by waiting for connections that may never settle.

Acceptance criteria for un-quarantine

  • Bump signup redirect budget in tests/helpers.ts from 15s to 30s, OR
  • Add server warmup in tests/global-setup.ts (hit a health endpoint before tests), OR
  • Replace waitForLoadState("networkidle") with explicit locator/URL waits.

References

  • Parent: #49 (quarantine tracking)
  • Epic: #38 (quality gates)
  • Audit: docs/ci/audit.md §3.2, §3.9
Quarantined under Mark/nodedesk#49 (Phase 2 quality gates). ## Test location - File: `tests/settings.spec.ts` - Test: "@smoke settings page loads with user info" (lines 4-11) ## Reproduction ```bash npm run test:e2e:all -- tests/settings.spec.ts ``` Note: Flaky — may pass on warm starts, fails on cold starts. ## Failure mode After clicking "Start trial" in `tests/helpers.ts`, the redirect to `/app` times out at 15s and renders Next's error page: `This page couldn't load — A server error occurred (ERROR 309949775)`. ## Root cause Cold-start DB/connection race in the production server started by Playwright. The `webServer` timeout is 120s, but the signup redirect budget in `helpers.ts` is only 15s. On a slow runner, the first request to `/app` hits a 500 before the DB connection pool warms up. The `waitForLoadState("networkidle")` usage (9 instances in helpers.ts, flagged in audit §3.9) compounds this by waiting for connections that may never settle. ## Acceptance criteria for un-quarantine - [ ] Bump signup redirect budget in `tests/helpers.ts` from 15s to 30s, OR - [ ] Add server warmup in `tests/global-setup.ts` (hit a health endpoint before tests), OR - [ ] Replace `waitForLoadState("networkidle")` with explicit locator/URL waits. ## References - Parent: #49 (quarantine tracking) - Epic: #38 (quality gates) - Audit: `docs/ci/audit.md` §3.2, §3.9
Mark 2026-08-09 18:56:58 +00:00
Sign in to join this conversation.
No description provided.