diff --git a/packages/testkit/test/ci-feedback.test.ts b/packages/testkit/test/ci-feedback.test.ts index 2df03542..7bb64c27 100644 --- a/packages/testkit/test/ci-feedback.test.ts +++ b/packages/testkit/test/ci-feedback.test.ts @@ -134,13 +134,15 @@ describe("Красные проверки возвращаются агенту" assert.equal((await sent()).length, 1, "one message for the superadmin"); assert.match((await sent())[0]!, new RegExp(`не проходят 3 раза подряд[\\s\\S]*Подробности: ${gitea.url}/`)); assert.equal(await core.taskDelayed(db, taskId), true, "the story shows the delay line"); - await t.p.waitLog("the agent got the third log", (e) => e.ev === "prompt" && String(e.prompt).includes("fail #2")); + // The mock takes the prompts one by one, two hook processes per turn: under a full CI run four turns + // in a row can take longer than the default 25 s — the condition is the same, only the wait is longer. + await t.p.waitLog("the agent got the third log", (e) => e.ev === "prompt" && String(e.prompt).includes("fail #2"), 90_000); // Attempts 4 and 5: nothing new for the superadmin; the 6th stops the agent. for (let i = 3; i < 5; i++) assert.equal(((await t.report(t.push(), "test", "failure", `fail #${i}`)).body as { action: string }).action, "agent"); assert.equal((await sent()).length, 1); assert.equal(((await t.report(t.push(), "test", "failure", "fail #5")).body as { action: string }).action, "admin"); assert.equal((await sent()).length, 2, "the attempts ran out — one more"); - await t.p.waitLog("runner told to stop", (e) => e.ev === "prompt" && String(e.prompt).includes("Не пушь новых попыток")); + await t.p.waitLog("runner told to stop", (e) => e.ev === "prompt" && String(e.prompt).includes("Не пушь новых попыток"), 90_000); assert.equal((await core.pendingQuestions(db, t.proj.id)).filter((x) => x.kind === "question").length, 0); // Green again → the counter starts over, the delay is gone. const sha = t.push();