Public: anyone can read this; the crew can change it.
test/crew-check-failed.test.ts runs under 10 s #3629
Check · Review · Land · Live done — Landed and live in production.
scout/forge:scout/3591-test-crew-check-failed-test-ts-runs-unde → main 2 commits fork
2 files
changed +5
−5
scripts/test-times.json +1 −1
| @@ -17,7 +17,7 @@ | ||
| 17 | 17 | "test/checks.test.ts": 26.3, |
| 18 | 18 | "test/cloud.test.ts": 7.1, |
| 19 | 19 | "test/crew-already-done.test.ts": 1.2, |
| 20 | "test/crew-check-failed.test.ts": 12.7, | |
| 20 | "test/crew-check-failed.test.ts": 1.8, | |
| 21 | 21 | "test/crew-continues.test.ts": 12.5, |
| 22 | 22 | "test/crew-declines.test.ts": 11.3, |
| 23 | 23 | "test/crew-limits.test.ts": 0.5, |
test/crew-check-failed.test.ts +4 −4
| @@ -32,7 +32,7 @@ describe("the crew, with a stand-in Claude Code: a failing check", () => { | ||
| 32 | 32 | agentRunSettled(app, repo, where, timeoutMs); |
| 33 | 33 | |
| 34 | 34 | beforeAll(async () => { |
| 35 | standIn = await startStandInCrew(); | |
| 35 | standIn = await startStandInCrew({ tickMs: 50 }); | |
| 36 | 36 | ({ app, alice, bot, repo, promptFile } = standIn); |
| 37 | 37 | }, 30_000); |
| 38 | 38 | |
| @@ -68,13 +68,13 @@ describe("the crew, with a stand-in Claude Code: a failing check", () => { | ||
| 68 | 68 | listRuns(app.db, orchard.id, { kind, limit: 50 }); |
| 69 | 69 | const until = async <T>( |
| 70 | 70 | find: () => T | undefined, |
| 71 | timeoutMs = 60_000, | |
| 71 | timeoutMs = 20_000, | |
| 72 | 72 | ): Promise<T> => { |
| 73 | 73 | const deadline = Date.now() + timeoutMs; |
| 74 | 74 | while (Date.now() < deadline) { |
| 75 | 75 | const found = find(); |
| 76 | 76 | if (found !== undefined) return found; |
| 77 | await Bun.sleep(100); | |
| 77 | await Bun.sleep(20); | |
| 78 | 78 | } |
| 79 | 79 | throw new Error("did not happen in time"); |
| 80 | 80 | }; |
| @@ -113,5 +113,5 @@ describe("the crew, with a stand-in Claude Code: a failing check", () => { | ||
| 113 | 113 | pullChecks().find((r) => r.state === "ok"), |
| 114 | 114 | ); |
| 115 | 115 | expect(passed.summary).toMatch(/^check passed/); |
| 116 | }, 120_000); | |
| 116 | }, 15_000); | |
| 117 | 117 | }); |
new above
offline