From 03ffc8d5962c6eda87643fecb9f93bc722256a77 Mon Sep 17 00:00:00 2001 From: JasonBuildAI Date: Thu, 8 Oct 2026 16:50:05 +0800 Subject: [PATCH] test: give telemetry probes their subprocess budget Each probe boots a fresh tsx process that captureRuntime already lets run for 15 s, but Vitest kills the test at its 5 s default first. Individually the probes take 3.2-4.3 s, so a full-suite run on a clean main checkout failed 2 of them with "Test timed out in 5000ms"; under this budget the suite is 302/302. --- tests/telemetry.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/telemetry.test.ts b/tests/telemetry.test.ts index 2230ed05..e894cdf6 100644 --- a/tests/telemetry.test.ts +++ b/tests/telemetry.test.ts @@ -1,7 +1,7 @@ import { execFile } from 'node:child_process'; import { readFile } from 'node:fs/promises'; import { promisify } from 'node:util'; -import { expect, it } from 'vitest'; +import { expect, it, vi } from 'vitest'; const run = promisify(execFile); const platformUrl = new URL('../src/server/platform.ts', import.meta.url).href; @@ -10,6 +10,10 @@ const workspaceUrl = new URL('../src/server/workspace.ts', import.meta.url) .href; const tsxUrl = import.meta.resolve('tsx'); +// Every probe boots a fresh tsx process, and captureRuntime already lets that +// process run for 15 s, which outlasts Vitest's 5 s default test timeout. +vi.setConfig({ testTimeout: 20000 }); + // Intercept the real SDK transport before import, in a fresh process so its // singleton observes each environment. These probes never send live telemetry. const probe = `