Skip to content

Commit d85d782

Browse files
committed
test: stabilize active-memory timeout assertion
1 parent 7c74071 commit d85d782

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

extensions/active-memory/index.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2210,7 +2210,7 @@ describe("active-memory plugin", () => {
22102210

22112211
it("returns timeout within a hard deadline even when the subagent never checks the abort signal", async () => {
22122212
const CONFIGURED_TIMEOUT_MS = 200;
2213-
const MARGIN_MS = 500;
2213+
const HARD_DEADLINE_MARGIN_MS = 4_800;
22142214
__testing.setMinimumTimeoutMsForTests(1);
22152215
__testing.setSetupGraceTimeoutMsForTests(0);
22162216
api.pluginConfig = {
@@ -2244,7 +2244,7 @@ describe("active-memory plugin", () => {
22442244
.mock.calls.map((call: unknown[]) => String(call[0]));
22452245
expect(infoLines.some((line: string) => line.includes("status=timeout"))).toBe(true);
22462246
// Hard deadline: wall-clock time must be near timeoutMs, not 30s.
2247-
expect(wallClockMs).toBeLessThan(CONFIGURED_TIMEOUT_MS + MARGIN_MS);
2247+
expect(wallClockMs).toBeLessThan(CONFIGURED_TIMEOUT_MS + HARD_DEADLINE_MARGIN_MS);
22482248
});
22492249

22502250
it("returns undefined instead of throwing when an unexpected error escapes prompt building", async () => {

0 commit comments

Comments
 (0)