From 0136bb4dcac22e7cd59c3265d51297daa1fe65ff Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Thu, 16 Jul 2026 17:37:55 -0700 Subject: [PATCH] test: shorten cron process-group timeout probe (#109457) --- src/cron/command-runner.test.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/cron/command-runner.test.ts b/src/cron/command-runner.test.ts index 1f91413cb22c..bc9cd1c8ead8 100644 --- a/src/cron/command-runner.test.ts +++ b/src/cron/command-runner.test.ts @@ -139,9 +139,8 @@ describe("runCronCommandJob", () => { it.skipIf(process.platform === "win32")("kills shell process groups on timeout", async () => { const tempDir = await fs.mkdtemp(path.join(os.tmpdir(), "openclaw-cron-command-")); const childPidPath = path.join(tempDir, "child.pid"); - const childScript = "setInterval(() => {}, 1000)"; const shellCommand = [ - `${JSON.stringify(process.execPath)} -e ${JSON.stringify(childScript)} &`, + "sleep 60 &", "child_pid=$!", `printf '%s' "$child_pid" > ${JSON.stringify(childPidPath)}`, 'wait "$child_pid"', @@ -151,7 +150,7 @@ describe("runCronCommandJob", () => { job: makeCommandJob({ kind: "command", argv: ["sh", "-lc", shellCommand], - timeoutSeconds: 1, + timeoutSeconds: 0.5, }), });