test: reduce process timeout test latency

This commit is contained in:
Peter Steinberger
2026-02-16 04:08:50 +00:00
parent e8a50e41a5
commit a7385aa8ac
2 changed files with 5 additions and 5 deletions

View File

@@ -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,
},
);

View File

@@ -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();