From a205ba4c29a514838638ff988a6b07fd6e4556c0 Mon Sep 17 00:00:00 2001 From: Turtle Date: Tue, 21 Jul 2026 09:42:12 +0800 Subject: [PATCH] test(sandbox): give the probe-timeout test headroom over vitest's default MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `bounds the default probes` runs a real launcher that sleeps 1s under the 5000ms default probe budget, all wrapped in vitest's 5000ms default test timeout. The blocking spawnSync races that wrapper and tips over under the load spike of a full parallel run — a pre-existing, load-sensitive flake (noted as unrelated in this PR's original description). Give the test an explicit 20s timeout so its bounded subprocess work never races the default. --- packages/sandbox/sandbox-local/tests/local.spec.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/packages/sandbox/sandbox-local/tests/local.spec.ts b/packages/sandbox/sandbox-local/tests/local.spec.ts index f9efbf992c..3ef5f7a586 100644 --- a/packages/sandbox/sandbox-local/tests/local.spec.ts +++ b/packages/sandbox/sandbox-local/tests/local.spec.ts @@ -339,7 +339,10 @@ describe('probeTimeoutMs config', () => { { platform: 'linux', probeBwrap: () => false, landlockLauncher: launcher }, ) expect(() => impatient.sandbox.confine(['true'], RO)).toThrow(expect.objectContaining({ code: SANDBOX_UNAVAILABLE })) - }) + // The patient probe blocks on a real 1s launcher under the 5000ms default + // budget; an explicit timeout keeps the test clear of vitest's 5000ms + // default, which the blocking spawnSync would otherwise race under load. + }, 20_000) }) describe('the default seatbelt probe (sandbox-exec contract)', () => {