diff --git a/dev-packages/e2e-tests/test-applications/react-router-6/tests/sse.test.ts b/dev-packages/e2e-tests/test-applications/react-router-6/tests/sse.test.ts index 6b859c9e789c..ef967790bab4 100644 --- a/dev-packages/e2e-tests/test-applications/react-router-6/tests/sse.test.ts +++ b/dev-packages/e2e-tests/test-applications/react-router-6/tests/sse.test.ts @@ -85,11 +85,13 @@ test('Waits for sse streaming when sse has been explicitly aborted', async ({ pa expect(durationInSeconds(httpGet)).toBe(0); // Spans carry no breadcrumbs, so the abort error is validated on the console directly - expect( - consoleMessages.some( - message => message.includes('Could not fetch sse') && message.includes('BodyStreamBuffer was aborted'), - ), - ).toBe(true); + // The abort error is logged asynchronously after the span is sent, so it may not have arrived yet. + // Older Chromium rejects with "BodyStreamBuffer was aborted", newer with the signal's abort reason. + await expect + .poll(() => + consoleMessages.some(message => message.includes('Could not fetch sse') && message.includes('AbortError')), + ) + .toBe(true); }); test('Aborts when stream takes longer than 5s, by not updating the span duration', async ({ page }) => {