From ba15d16c5869ef29e85a0e9bacff3ac07edda3a2 Mon Sep 17 00:00:00 2001 From: morluto <76467478+morluto@users.noreply.github.com> Date: Mon, 13 Jul 2026 17:11:46 +0800 Subject: [PATCH] test(process): use deterministic hang fixture --- tests/processCapture.test.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/tests/processCapture.test.ts b/tests/processCapture.test.ts index 9ce90a44f..e3edd43bf 100644 --- a/tests/processCapture.test.ts +++ b/tests/processCapture.test.ts @@ -702,17 +702,17 @@ describe("process capture adapter", () => { if (!capability.available) return; const policy: ProcessExecutionPolicy = { enabled: true, - executableRoots: ["/bin"], - workingRoots: ["/tmp"], + executableRoots: [dirname(process.execPath)], + workingRoots: [dirname(processFixture)], allowedEnvironment: [], allowExternalNetwork: true, }; const timedOut = await captureProcessScenario( parseProcessScenario({ approved: true, - executable: "/bin/sh", - arguments: ["-c", "sleep 5"], - working_directory: "/tmp", + executable: process.execPath, + arguments: [processFixture, "hang"], + working_directory: dirname(processFixture), timeout_ms: 50, idle_timeout_ms: 5_000, }), @@ -731,9 +731,9 @@ describe("process capture adapter", () => { const cancelled = await captureProcessScenario( parseProcessScenario({ approved: true, - executable: "/bin/sh", - arguments: ["-c", "sleep 5"], - working_directory: "/tmp", + executable: process.execPath, + arguments: [processFixture, "hang"], + working_directory: dirname(processFixture), timeout_ms: 5_000, idle_timeout_ms: 5_000, }),