test(cli-proxy-path): raise timeout for spawn-based tests to fix load flake (#504)

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.
This commit is contained in:
Resham Joshi 2026-06-18 12:57:44 +02:00 committed by GitHub
parent a9c0273a42
commit b481f81fc4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,7 +3,13 @@ import { tmpdir } from 'node:os'
import { join } from 'node:path'
import { spawnSync } from 'node:child_process'
import { afterEach, describe, expect, it } from 'vitest'
import { afterEach, describe, expect, it, vi } from 'vitest'
// Each test spawns `tsx src/cli.ts` several times, which re-transpiles the CLI
// on every spawn. Under full-suite parallel load those spawns contend for CPU
// and can exceed the 5s default, so give this spawn-based file a timeout that
// matches the per-spawn cap below. The slowest test runs ~1.7s in isolation.
vi.setConfig({ testTimeout: 30_000 })
let homes: string[] = []