Skip to content

Commit 083377a

Browse files
committed
test(codex): wait for diagnostic event locally
1 parent 4b03e07 commit 083377a

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

extensions/codex/src/app-server/run-attempt.test.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6830,7 +6830,13 @@ describe("runCodexAppServerAttempt", () => {
68306830
await harness.waitForMethod("turn/start");
68316831
await harness.completeTurn({ threadId: "thread-1", turnId: "turn-1" });
68326832
await run;
6833-
await flushDiagnosticEvents();
6833+
await vi.waitFor(
6834+
() =>
6835+
expect(diagnosticEvents.some((event) => event.type === "model.call.completed")).toBe(
6836+
true,
6837+
),
6838+
fastWait,
6839+
);
68346840

68356841
const startedEvent = diagnosticEvents.find((event) => event.type === "model.call.started");
68366842
const completedEvent = diagnosticEvents.find(

0 commit comments

Comments
 (0)