From a6f26e8641034e399d6071d1d1cb1e0b2b944a8c Mon Sep 17 00:00:00 2001 From: VOIDXAI Date: Tue, 31 Mar 2026 11:38:00 +0800 Subject: [PATCH] tests: reduce background task timing flakiness --- tests/fake-codex-fixture.mjs | 2 +- tests/runtime.test.mjs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/fake-codex-fixture.mjs b/tests/fake-codex-fixture.mjs index ac7f084..7e51b13 100644 --- a/tests/fake-codex-fixture.mjs +++ b/tests/fake-codex-fixture.mjs @@ -465,7 +465,7 @@ rl.on("line", (line) => { } } send({ method: "turn/completed", params: { threadId: thread.id, turn: buildTurn(turnId, "completed") } }); - }, 400); + }, 5000); interruptibleTurns.set(turnId, { threadId: thread.id, timer }); } else if (BEHAVIOR === "slow-task") { emitTurnCompletedLater(thread.id, turnId, items, 400); diff --git a/tests/runtime.test.mjs b/tests/runtime.test.mjs index 43ed17c..d085abf 100644 --- a/tests/runtime.test.mjs +++ b/tests/runtime.test.mjs @@ -553,7 +553,7 @@ test("task --background enqueues a detached worker and exposes per-job status", const waitedStatus = run( "node", - [SCRIPT, "status", launchPayload.jobId, "--wait", "--timeout-ms", "5000", "--json"], + [SCRIPT, "status", launchPayload.jobId, "--wait", "--timeout-ms", "15000", "--json"], { cwd: repo, env: buildEnv(binDir) @@ -1275,7 +1275,7 @@ test("cancel sends turn interrupt to the shared app-server before killing a brok return job; } return null; - }); + }, { timeoutMs: 15000 }); const cancelResult = run("node", [SCRIPT, "cancel", jobId, "--json"], { cwd: repo,