Skip to content

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

Merged
Lms24 merged 1 commit into
developfrom
test/browser-flaky-timing-bounds
Oct 22, 2026
Merged

Lms24 merged 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]

@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
@mydea
mydea force-pushed the test/browser-flaky-timing-bounds branch from 904bb39 to 90735d9 Compare October 21, 2026 12:03
@github-actions

github-actions Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Compared: 6169fa5 (PR test merge using develop at d4a4e81)

Against: ca4fc32 (develop) · base run #62950

⚠️ Baseline mismatch: 1 develop commit(s) in the PR build are missing from the baseline. Their size changes also affect this comparison. Compare commits. Re-run once develop's baseline build for d4a4e81 finishes.

Path Size % Change Change
@sentry/browser 29.91 kB - -
@sentry/browser - with treeshaking flags 28.05 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.95 kB - -
@sentry/browser (incl. Tracing) 52.1 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 52.1 kB - -
@sentry/browser (incl. Tracing, Profiling) 55.05 kB - -
@sentry/browser (incl. Tracing, Replay) 91.85 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 80.72 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 96.58 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 109.52 kB - -
@sentry/browser (incl. Feedback) 47.42 kB - -
@sentry/browser (incl. sendFeedback) 34.97 kB - -
@sentry/browser (incl. FeedbackAsync) 40.07 kB - -
@sentry/browser (incl. Metrics) 30.93 kB - -
@sentry/browser (incl. Logs) 31.21 kB - -
@sentry/browser (incl. Metrics & Logs) 31.84 kB - -
@sentry/react 31.74 kB - -
@sentry/react (incl. Tracing) 54.42 kB - -
@sentry/vue 38.07 kB - -
@sentry/vue (incl. Tracing) 55.03 kB - -
@sentry/svelte 29.93 kB - -
@sentry/remix (Remix 3 client bundle) 57.11 kB - -
CDN Bundle 31.67 kB - -
CDN Bundle (incl. Tracing) 52.61 kB - -
CDN Bundle (incl. Logs, Metrics) 33.87 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 54.55 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.79 kB - -
CDN Bundle (incl. Tracing, Replay) 90.28 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 92.21 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 96.42 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 98.37 kB - -
CDN Bundle - uncompressed 93.29 kB - -
CDN Bundle (incl. Tracing) - uncompressed 156.14 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 99.84 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 162.11 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 229.88 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 276.31 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 282.26 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 290.01 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 295.96 kB - -
@sentry/nextjs (client) 57.31 kB - -
@sentry/sveltekit (client) 52.48 kB - -
@sentry/core/server 41.8 kB - -
@sentry/core/browser 13.81 kB - -
@sentry/node 152.62 kB -0.01% -1 B 🔽
@sentry/node/import (ESM hook with diagnostics-channel injection) 81.58 kB - -
@sentry/node - without tracing 94.25 kB -0.01% -1 B 🔽
@sentry/node - without channel injection 133.3 kB -0.01% -2 B 🔽
@sentry/aws-serverless 102.43 kB -0.01% -3 B 🔽
@sentry/cloudflare (withSentry) - minified 211.11 kB - -
@sentry/cloudflare (withSentry) 523.83 kB - -
@sentry/nextjs/cloudflare (withSentry) - minified 230.74 kB - -

View base workflow run

…ing assertions

Co-Authored-By: Francesco Gringl-Novy <francesco.novy@sentry.io>
@mydea
mydea force-pushed the test/browser-flaky-timing-bounds branch from 90735d9 to 79a6f1e Compare October 21, 2026 15:25
@Lms24
Lms24 merged commit 8042719 into develop Oct 22, 2026
68 checks passed
@Lms24
Lms24 deleted the test/browser-flaky-timing-bounds branch October 22, 2026 09: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