test: trim bash tool timing constants

This commit is contained in:
Peter Steinberger
2026-02-22 16:23:03 +00:00
parent c23cdf67d7
commit c5904da85a

View File

@@ -12,8 +12,8 @@ const defaultShell = isWin
: process.env.OPENCLAW_TEST_SHELL || resolveShellFromPath("bash") || process.env.SHELL || "sh";
// PowerShell: Start-Sleep for delays, ; for command separation, $null for null device
const shortDelayCmd = isWin ? "Start-Sleep -Milliseconds 8" : "sleep 0.008";
const yieldDelayCmd = isWin ? "Start-Sleep -Milliseconds 40" : "sleep 0.04";
const longDelayCmd = isWin ? "Start-Sleep -Milliseconds 180" : "sleep 0.18";
const yieldDelayCmd = isWin ? "Start-Sleep -Milliseconds 30" : "sleep 0.03";
const longDelayCmd = isWin ? "Start-Sleep -Milliseconds 120" : "sleep 0.12";
const POLL_INTERVAL_MS = 15;
const TEST_EXEC_DEFAULTS = { security: "full" as const, ask: "off" as const };
const createTestExecTool = (
@@ -149,7 +149,7 @@ describe("exec tool backgrounding", () => {
});
it("uses default timeout when timeout is omitted", async () => {
const customBash = createTestExecTool({ timeoutSec: 0.1, backgroundMs: 10 });
const customBash = createTestExecTool({ timeoutSec: 0.08, backgroundMs: 10 });
const customProcess = createProcessTool();
const result = await customBash.execute("call1", {