Skip to content

test(local): Wait for the event URL before going Back - #2933

Open
sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/local-default-pick-back-race
Open

sentry-junior[bot] wants to merge 1 commit into
mainfrom
fix/local-default-pick-back-race

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Dec 5, 2026

Copy link
Copy Markdown
Contributor

Fixes the flaky the default pick does not go stale outside Events test in apps/local, which is blocking CLI releases.

Root cause (test only, not the viewer): nuqs writes the URL at most once per 50ms. Clicking "Open events view" writes it (resetWorkspace). If the POST /first click came less than 50ms later, its ?event= push was still queued when the test called history.back(). jsdom's Back then left the wrong history entry, and the queued push landed after it, so the detail stayed on POST /first. Faster runners close that gap more often, which is why ubuntu/macOS failed and Windows passed.

The fix waits for the event to reach the URL before going Back, the same way the other Back tests in this file already do. Viewer behavior is unchanged.

Before: 37 of 202 repeated runs failed (same assertion as CI)
After:  0 of 301 repeated runs failed, plus 0 of 82 with every core pinned by busy loops

via @BYK.

--

View Session [Sentry]

"the default pick does not go stale outside Events" flaked on fast
runners. nuqs writes the URL at most once per 50ms. Opening Events
writes it, so when the POST /first click came within 50ms of that
write, the ?event= history entry was still queued when the test called
history.back(). Back then left the wrong entry and the queued push
landed after it, so the detail stayed on POST /first.

Wait for the event to reach the URL before going Back, the same way the
other Back tests in this file do.

Co-Authored-By: BYK <126780+BYK@users.noreply.github.com>
@sentry-junior
sentry-junior Bot requested a review from BYK December 5, 2026 08:39
@vercel

vercel Bot commented Dec 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cli Ready Ready Preview Dec 5, 2026 8:39am UTC
sentry-local Ready Ready Preview Dec 5, 2026 8:39am UTC

Request Review

This branch was successfully deployed

2 active deployments
Preview – cli — 1b98fc08 Deployed Dec 5, 2026 by vercel[bot]
Preview – sentry-local — 1b98fc08 Deployed Dec 5, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

risk: low PR risk score: low

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant