Skip to content

Commit c14c043

Browse files
committed
test(agents): stabilize yielded exec timeout test
1 parent 3bb4be2 commit c14c043

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/agents/bash-tools.exec.background-abort.test.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ const ABORT_SETTLE_MS = process.platform === "win32" ? 200 : 0;
8585
const POLL_INTERVAL_MS = process.platform === "win32" ? 15 : 5;
8686
const FINISHED_WAIT_TIMEOUT_MS = process.platform === "win32" ? 8_000 : 1_000;
8787
const BACKGROUND_TIMEOUT_SEC = process.platform === "win32" ? 0.2 : 0.02;
88+
const YIELDED_BACKGROUND_TIMEOUT_SEC = process.platform === "win32" ? 0.4 : 0.2;
8889
const TEST_EXEC_DEFAULTS = {
8990
host: "gateway" as const,
9091
security: "full" as const,
@@ -272,24 +273,24 @@ test("yielded background exec still times out", async () => {
272273
executeParams: {
273274
command: BACKGROUND_HOLD_CMD,
274275
yieldMs: 5,
275-
timeout: BACKGROUND_TIMEOUT_SEC,
276+
timeout: YIELDED_BACKGROUND_TIMEOUT_SEC,
276277
},
277-
expectedTimeoutSec: BACKGROUND_TIMEOUT_SEC,
278+
expectedTimeoutSec: YIELDED_BACKGROUND_TIMEOUT_SEC,
278279
});
279280
});
280281

281282
test("yieldMs exec without explicit timeout applies default timeout", async () => {
282283
const tool = createTestExecTool({
283284
allowBackground: true,
284285
backgroundMs: 10,
285-
timeoutSec: BACKGROUND_TIMEOUT_SEC,
286+
timeoutSec: YIELDED_BACKGROUND_TIMEOUT_SEC,
286287
});
287288
await expectBackgroundSessionTimesOut({
288289
tool,
289290
executeParams: {
290291
command: BACKGROUND_HOLD_CMD,
291292
yieldMs: 5,
292293
},
293-
expectedTimeoutSec: BACKGROUND_TIMEOUT_SEC,
294+
expectedTimeoutSec: YIELDED_BACKGROUND_TIMEOUT_SEC,
294295
});
295296
});

0 commit comments

Comments
 (0)