Skip to content

test(browser): Fix flaky long task, pageload cancellation and CLS timing assertions - #25518

Open
sentry-junior[bot] wants to merge 1 commit into
developfrom
test/browser-flaky-timing-bounds
Open

sentry-junior[bot] wants to merge 1 commit into
developfrom
test/browser-flaky-timing-bounds

Conversation

@sentry-junior

@sentry-junior sentry-junior Bot commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

These browser integration tests showed up in last week's flaky test report. Each one failed on develop because of a timing assertion that was too strict for loaded CI runners.

  • Long task / long animation frame: the test script blocks for 105ms, but the 0.15s upper bound failed with real durations of 0.15–0.37s. A long animation frame covers the whole frame, and a long task can be stretched by CPU contention. The upper bound is now 1s, which still catches unit or offset bugs. Separately, the long-task tests used the first ui.long_task span. Sometimes that was an unrelated pageload task (~50–65ms), so the test failed the 0.1s lower bound. They now use the longest span, which is the blocking script.
  • reportPageLoaded navigation: the pageload span started at time origin, but init's 1s setTimeout can run late (1.59s seen in CI). The bound is now 2.5s, the point where reportPageLoaded() would have ended the span. The finish reason is still asserted to be cancelled.
  • CLS 0.35: the ±0.01 window was much tighter than the other cases (0.3378 seen in CI). It's now ±0.03.

via Francesco Gringl-Novy.

--

View Junior Session [Sentry]

…ing assertions

Co-Authored-By: Francesco Gringl-Novy <francesco.novy@sentry.io>
@mydea mydea self-assigned this Oct 19, 2026
@mydea
mydea marked this pull request as ready for review October 19, 2026 14:08
@mydea
mydea requested a review from a team as a code owner October 19, 2026 14:08
@mydea
mydea requested review from Lms24 and logaretm and removed request for a team October 19, 2026 14:08

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.

1 participant