Skip to content

test(frontend): raise vitest testTimeout to fix CI flake#63

Merged
untraceablez merged 1 commit into
mainfrom
fix/frontend-test-timeout-flake
Jun 25, 2026
Merged

test(frontend): raise vitest testTimeout to fix CI flake#63
untraceablez merged 1 commit into
mainfrom
fix/frontend-test-timeout-flake

Conversation

@untraceablez

Copy link
Copy Markdown
Owner

Why

After #62 merged, Jenkins build #15 on main still went red — but not on #62's changes and not on the SonarQube quality gate. It failed at the frontend test stage on a single test:

FAIL  src/components/settings/HouseholdSettings.test.tsx > HouseholdSettings > surfaces a save error (detail + fallback)
Error: Test timed out in 5000ms.
Test Files  1 failed | 41 passed (42)
      Tests  1 failed | 436 passed (437)

Backend passed; because the frontend stage failed, the pipeline never reached the Sonar/Quality-Gate stage, so #62's gate fix is still unconfirmed.

That test renders HouseholdSettings (all heavy child managers stubbed — no network I/O), then does three findBy look-ups and two save clicks. Locally it runs in <200ms. But the full suite (40+ files) runs in parallel worker threads, and on CI's shared cores it occasionally crosses the 5000ms default testTimeout and times out. It's a load-sensitive flake, not a regression — the full suite is 437 green locally.

What

Raise vitest's testTimeout/hookTimeout to 20000ms in vite.config.ts. Generous headroom so contention can't red the build; a genuinely hung test still fails (just later). vite.config.ts already matches the **/*.config.ts Sonar exclusion, so this adds no new-code coverage/violations.

Verification

🤖 Generated with Claude Code

Build #15 on main went red on a single frontend test
(HouseholdSettings > "surfaces a save error") with
`Error: Test timed out in 5000ms` — backend passed and the failure
never reached the Sonar stage. The test renders + does three findBy
look-ups and two save clicks; locally it runs in <200ms, but the full
suite (40+ files) runs in parallel worker threads and on CI's shared
cores it occasionally crosses the 5s default and times out. Not a real
regression (full suite is 437 green locally).

Raise testTimeout/hookTimeout to 20000ms so contention can't red the
build; a genuinely hung test still fails, just later. vite.config.ts is
already excluded from Sonar sources (**/*.config.ts), so no new-code
impact.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Wr2keVNHj51gFeShnKqa7Q
@untraceablez untraceablez merged commit f7d4fe8 into main Jun 25, 2026
1 check passed
@untraceablez untraceablez deleted the fix/frontend-test-timeout-flake branch June 25, 2026 17:07
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.

1 participant