Skip to content

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

Open
mydea wants to merge 1 commit into
developfrom
fix/react-router-6-sse-flaky
Open

mydea wants to merge 1 commit 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.

🤖 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? 🤔

This branch has not been deployed

No deployments
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