From 6b5a6f22b8b0b279190fa04c3f4259f292bc8ec0 Mon Sep 17 00:00:00 2001 From: lforst <8118419+lforst@users.noreply.github.com> Date: Tue, 1 Sep 2026 11:12:48 +0000 Subject: [PATCH] test(e2e): Fix failing e2e tests due to race --- e2e/scenarios/eve-instrumentation/scenario.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/scenarios/eve-instrumentation/scenario.ts b/e2e/scenarios/eve-instrumentation/scenario.ts index 223c73936..59445c72e 100644 --- a/e2e/scenarios/eve-instrumentation/scenario.ts +++ b/e2e/scenarios/eve-instrumentation/scenario.ts @@ -111,9 +111,6 @@ async function main() { seenSessionIds, "session.waiting", ); - // Eve can publish the waiting boundary just before the completed turn's - // model history becomes visible to a follow-up request. - await new Promise((resolve) => setTimeout(resolve, 1000)); const followUp = await fetch( `${baseUrl}/eve/v1/session/${body.sessionId}`, { @@ -122,6 +119,9 @@ async function main() { ? { continuationToken: body.continuationToken } : {}), message: "Run the Braintrust Eve instrumentation e2e scenario again", + // Queue the follow-up if the waiting event arrives while Eve is still + // committing the completed turn's model history. + turnPolicy: "queue", }), headers: { "content-type": "application/json" }, method: "POST",