豆豆友情提示:这是一个非官方 GitHub 代理镜像,主要用于网络测试或访问加速。请勿在此进行登录、注册或处理任何敏感信息。进行这些操作请务必访问官方网站 github.com。 Raw 内容也通过此代理提供。
Skip to content

Commit 8e403f9

Browse files
authored
tests: reduce background task timing flakiness (#37)
Co-authored-by: VOIDXAI <VOIDXAI@users.noreply.github.com>
1 parent 6360899 commit 8e403f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

tests/fake-codex-fixture.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -467,7 +467,7 @@ rl.on("line", (line) => {
467467
}
468468
}
469469
send({ method: "turn/completed", params: { threadId: thread.id, turn: buildTurn(turnId, "completed") } });
470-
}, 400);
470+
}, 5000);
471471
interruptibleTurns.set(turnId, { threadId: thread.id, timer });
472472
} else if (BEHAVIOR === "slow-task") {
473473
emitTurnCompletedLater(thread.id, turnId, items, 400);

tests/runtime.test.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ test("task --background enqueues a detached worker and exposes per-job status",
554554

555555
const waitedStatus = run(
556556
"node",
557-
[SCRIPT, "status", launchPayload.jobId, "--wait", "--timeout-ms", "5000", "--json"],
557+
[SCRIPT, "status", launchPayload.jobId, "--wait", "--timeout-ms", "15000", "--json"],
558558
{
559559
cwd: repo,
560560
env: buildEnv(binDir)
@@ -1276,7 +1276,7 @@ test("cancel sends turn interrupt to the shared app-server before killing a brok
12761276
return job;
12771277
}
12781278
return null;
1279-
});
1279+
}, { timeoutMs: 15000 });
12801280

12811281
const cancelResult = run("node", [SCRIPT, "cancel", jobId, "--json"], {
12821282
cwd: repo,

0 commit comments

Comments
 (0)