test(perf): tighten exec timeout slack in non-flaky cases

This commit is contained in:
Peter Steinberger
2026-03-02 12:57:53 +00:00
parent b02b94673f
commit a9d572394e

View File

@@ -25,7 +25,7 @@ describe("runCommandWithTimeout", () => {
'process.stdout.write((process.env.OPENCLAW_BASE_ENV ?? "") + "|" + (process.env.OPENCLAW_TEST_ENV ?? ""))',
],
{
timeoutMs: 400,
timeoutMs: 120,
env: { OPENCLAW_TEST_ENV: "ok" },
},
);
@@ -40,7 +40,7 @@ describe("runCommandWithTimeout", () => {
const result = await runCommandWithTimeout(
[process.execPath, "-e", "setTimeout(() => {}, 20)"],
{
timeoutMs: 180,
timeoutMs: 80,
noOutputTimeoutMs: 8,
},
);
@@ -68,7 +68,7 @@ describe("runCommandWithTimeout", () => {
].join(" "),
],
{
timeoutMs: 500,
timeoutMs: 180,
// Keep a healthy margin above the emit interval while avoiding long idle waits.
noOutputTimeoutMs: 120,
},
@@ -84,7 +84,7 @@ describe("runCommandWithTimeout", () => {
const result = await runCommandWithTimeout(
[process.execPath, "-e", "setTimeout(() => {}, 12)"],
{
timeoutMs: 8,
timeoutMs: 6,
},
);