Skip to content

test(react): Fix flaky react-router-6 aborted SSE console assertion - #25398

Merged
mydea merged 2 commits into
developfrom
fix/react-router-6-sse-flaky
Oct 16, 2026
Merged

mydea merged 2 commits into
developfrom
fix/react-router-6-sse-flaky

Conversation

@mydea

@mydea mydea commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

The Waits for sse streaming when sse has been explicitly aborted test checked for the abort error in the console immediately after the spans arrived. The sse fetch call span ends when fetch resolves, but the console.error only happens after the aborted reader.read() rejects, and Playwright delivers console events asynchronously. Nothing orders the two, so the console message sometimes hadn't been recorded yet. The assertion now polls for it.

The assertion also matched on BodyStreamBuffer was aborted, which only older Chromium logs. Since Playwright 1.64 (#25382), Chromium rejects the read with the signal's abort reason (AbortError: signal is aborted without reason), so the test failed on every run there. It now matches any AbortError.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mydea
mydea marked this pull request as ready for review October 15, 2026 12:17
@mydea
mydea requested review from logaretm and s1gr1d October 15, 2026 12:17

@s1gr1d s1gr1d left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could probably use page.waitForEvent for this instead, wdyt?

@mydea

mydea commented Oct 15, 2026

Copy link
Copy Markdown
Member Author

We could probably use page.waitForEvent for this instead, wdyt?

is this better than expect.poll? it would also just poll the array I guess? 🤔

Chromium in Playwright 1.64 rejects the aborted read with the signal's abort
reason ("signal is aborted without reason") instead of "BodyStreamBuffer was
aborted". Both are AbortErrors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@mydea
mydea merged commit 5a11c08 into develop Oct 16, 2026
372 of 375 checks passed
@mydea
mydea deleted the fix/react-router-6-sse-flaky branch October 16, 2026 08:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants