mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-30 11:46:26 +00:00
test: reduce process timeout test latency
This commit is contained in:
@@ -41,7 +41,7 @@ describe("runCommandWithTimeout", () => {
|
||||
[process.execPath, "-e", "setTimeout(() => {}, 10_000)"],
|
||||
{
|
||||
timeoutMs: 5_000,
|
||||
noOutputTimeoutMs: 100,
|
||||
noOutputTimeoutMs: 120,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -55,11 +55,11 @@ describe("runCommandWithTimeout", () => {
|
||||
[
|
||||
process.execPath,
|
||||
"-e",
|
||||
'let i=0; const t=setInterval(() => { process.stdout.write("."); i += 1; if (i >= 3) { clearInterval(t); process.exit(0); } }, 20);',
|
||||
'let i=0; const t=setInterval(() => { process.stdout.write("."); i += 1; if (i >= 3) { clearInterval(t); process.exit(0); } }, 15);',
|
||||
],
|
||||
{
|
||||
timeoutMs: 5_000,
|
||||
noOutputTimeoutMs: 100,
|
||||
noOutputTimeoutMs: 80,
|
||||
},
|
||||
);
|
||||
|
||||
@@ -73,7 +73,7 @@ describe("runCommandWithTimeout", () => {
|
||||
const result = await runCommandWithTimeout(
|
||||
[process.execPath, "-e", "setTimeout(() => {}, 10_000)"],
|
||||
{
|
||||
timeoutMs: 80,
|
||||
timeoutMs: 60,
|
||||
},
|
||||
);
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@ describe("process supervisor", () => {
|
||||
mode: "child",
|
||||
argv: [process.execPath, "-e", "setTimeout(() => {}, 10_000)"],
|
||||
timeoutMs: 5_000,
|
||||
noOutputTimeoutMs: 120,
|
||||
noOutputTimeoutMs: 80,
|
||||
stdinMode: "pipe-closed",
|
||||
});
|
||||
const exit = await run.wait();
|
||||
|
||||
Reference in New Issue
Block a user