mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 02:27:28 +00:00
test: shorten idle child timers in timeout assertions
This commit is contained in:
@@ -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,
|
||||
},
|
||||
|
||||
@@ -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",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user