mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-21 21:01:38 +00:00
test: shorten cron process-group timeout probe (#109457)
This commit is contained in:
committed by
GitHub
parent
eb4f3d792f
commit
0136bb4dca
@@ -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,
|
||||
}),
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user