From b481f81fc478cee6acbca6abb28d9a05314fba63 Mon Sep 17 00:00:00 2001 From: Resham Joshi <65915470+iamtoruk@users.noreply.github.com> Date: Thu, 18 Jun 2026 12:57:44 +0200 Subject: [PATCH] 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. --- tests/cli-proxy-path.test.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tests/cli-proxy-path.test.ts b/tests/cli-proxy-path.test.ts index eb1fc1f..85b354c 100644 --- a/tests/cli-proxy-path.test.ts +++ b/tests/cli-proxy-path.test.ts @@ -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[] = []