mirror of
https://github.com/openclaw/openclaw.git
synced 2026-04-18 12:37:27 +00:00
test: trim bash tool timing constants
This commit is contained in:
@@ -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", {
|
||||
|
||||
Reference in New Issue
Block a user