Skip to content

test(cli-proxy-path): fix load-timeout flake by raising the test timeout#504

Merged
iamtoruk merged 1 commit into
mainfrom
test/cli-proxy-path-timeout
Jun 18, 2026
Merged

test(cli-proxy-path): fix load-timeout flake by raising the test timeout#504
iamtoruk merged 1 commit into
mainfrom
test/cli-proxy-path-timeout

Conversation

@iamtoruk

Copy link
Copy Markdown
Member

Problem

tests/cli-proxy-path.test.ts spawns tsx src/cli.ts several times per test, which re-transpiles the CLI on every spawn. Under full-suite parallel load those spawns contend for CPU, so the slowest test occasionally exceeded the 5s default test timeout, even though it runs in ~1.7s in isolation and each spawnSync already allows 30s.

Fix

Set the file-level testTimeout to 30s (via vi.setConfig), matching the existing per-spawn cap. Spawn-based integration tests are inherently slower than unit tests and shouldn't be held to the 5s default. No test logic changed.

Verification

  • File solo: 6/6 pass.
  • Full suite: 1194/1194 across two consecutive runs (previously cli-proxy-path intermittently timed out under load).

… flake

Each test spawns 'tsx src/cli.ts' several times, re-transpiling the CLI on
every spawn. Under full-suite parallel load these spawns contend for CPU and
the slowest test could exceed the 5s default timeout, even though it runs in
~1.7s in isolation and the spawnSync calls already allow 30s each. Set the
file testTimeout to 30s so the wrapper matches the per-spawn cap. Full suite
is green across repeated runs.
@iamtoruk iamtoruk merged commit b481f81 into main Jun 18, 2026
3 checks passed
@iamtoruk iamtoruk deleted the test/cli-proxy-path-timeout branch June 18, 2026 10:57
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