test: shorten idle child timers in timeout assertions

This commit is contained in:
Peter Steinberger
2026-02-22 12:37:49 +00:00
parent 5b23159c4c
commit 00eb2541dc
2 changed files with 5 additions and 5 deletions

View File

@@ -34,7 +34,7 @@ describe("runCommandWithTimeout", () => {
it("kills command when no output timeout elapses", async () => {
const result = await runCommandWithTimeout(
[process.execPath, "-e", "setTimeout(() => {}, 120)"],
[process.execPath, "-e", "setTimeout(() => {}, 60)"],
{
timeoutMs: 1_000,
noOutputTimeoutMs: 35,
@@ -68,7 +68,7 @@ describe("runCommandWithTimeout", () => {
it("reports global timeout termination when overall timeout elapses", async () => {
const result = await runCommandWithTimeout(
[process.execPath, "-e", "setTimeout(() => {}, 120)"],
[process.execPath, "-e", "setTimeout(() => {}, 60)"],
{
timeoutMs: 15,
},

View File

@@ -24,7 +24,7 @@ describe("process supervisor", () => {
sessionId: "s1",
backendId: "test",
mode: "child",
argv: [process.execPath, "-e", "setTimeout(() => {}, 120)"],
argv: [process.execPath, "-e", "setTimeout(() => {}, 60)"],
timeoutMs: 1_000,
noOutputTimeoutMs: 20,
stdinMode: "pipe-closed",
@@ -42,7 +42,7 @@ describe("process supervisor", () => {
backendId: "test",
scopeKey: "scope:a",
mode: "child",
argv: [process.execPath, "-e", "setTimeout(() => {}, 120)"],
argv: [process.execPath, "-e", "setTimeout(() => {}, 60)"],
timeoutMs: 1_000,
stdinMode: "pipe-open",
});
@@ -71,7 +71,7 @@ describe("process supervisor", () => {
sessionId: "s-timeout",
backendId: "test",
mode: "child",
argv: [process.execPath, "-e", "setTimeout(() => {}, 120)"],
argv: [process.execPath, "-e", "setTimeout(() => {}, 60)"],
timeoutMs: 1,
stdinMode: "pipe-closed",
});