Skip to content

Give tests 30 s on CI, not vitest's default 5 s - #63

Merged
powoct merged 1 commit into
mainfrom
ci-test-timeout
Oct 18, 2026
Merged

powoct merged 1 commit into
mainfrom
ci-test-timeout

Conversation

@powoct

@powoct powoct commented Oct 18, 2026

Copy link
Copy Markdown
Owner

Hosted Windows runners sometimes stall. Three times in a week, a test that normally takes 300–700 ms ran past vitest's 5 s default: twice on #60, once on #62. Each time it was a different test, and each passed when rerun. Raising the timeout one test at a time only moves the next stall to another test, so this sets the default instead.

  • vitest.config.mts: testTimeout: process.env.CI ? 30_000 : 5_000. GitHub Actions always sets CI. Locally the default stays, so a hang still fails fast. Tests that already ask for 60 s or more keep their own limit.
  • Checked with a throwaway test that sleeps 6 s: it passes with CI=true and times out without it.
  • npm run verify passes locally (1460 + 25 tests).

No change to the plugin; the bundle is unaffected.

🤖 Generated with Claude Code

https://claude.ai/code/session_01VpkUdtXX2L922fZcehBBVK

Hosted Windows runners stall now and then. Tests that take 300–700 ms on
main ran past the 5 s default three times in a week (#60 twice, #62 once).
Each time it was a different test, and each passed on a rerun. Raising
the timeout one test at a time only moves the next stall to another test.

The longer limit applies only when CI is set, which GitHub Actions always
sets. Locally the default stays, so a hang still fails fast. Tests that
already ask for 60 s or more keep their own limit.

Checked with a throwaway test that sleeps 6 s: it passes with CI=true and
times out without it.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VpkUdtXX2L922fZcehBBVK
@powoct
powoct merged commit 96adf00 into main Oct 18, 2026
5 checks passed
@powoct
powoct deleted the ci-test-timeout branch October 18, 2026 08:01
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