Skip to content

test(browser): Fix flaky reportPageLoaded duration assertion - #24814

Merged
mydea merged 1 commit into
developfrom
test/fix-report-page-loaded-flake
Sep 29, 2026
Merged

mydea merged 1 commit into
developfrom
test/fix-report-page-loaded-flake

Conversation

@mydea

@mydea mydea commented Sep 29, 2026

Copy link
Copy Markdown
Member

The reportPageLoaded default tests flaked in CI with a pageload span duration of ~3.16s against a < 3 upper bound.

Root cause: the pageload span starts at navigation start, but the 2.5s setTimeout before Sentry.reportPageLoaded() only begins once the test bundle has executed, so page load time on a slow runner is added on top. Bumping the upper bound to 4s gives enough headroom; the idle_span_finish_reason: 'reportPageLoaded' assertion already guarantees the span wasn't ended by a timeout. Applied to both the static and streamed variants.

🤖 Generated with Claude Code

The pageload span starts at navigation start, but the 2.5s timeout before
reportPageLoaded() only starts once the bundle has executed, so slow CI
runners can push the duration past 3s.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.24 kB - -
@sentry/browser - with treeshaking flags 27.5 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.4 kB - -
@sentry/browser (incl. Tracing) 51.15 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.17 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.18 kB - -
@sentry/browser (incl. Tracing, Replay) 90.76 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.86 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 95.46 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 108.41 kB - -
@sentry/browser (incl. Feedback) 46.76 kB - -
@sentry/browser (incl. sendFeedback) 34.3 kB - -
@sentry/browser (incl. FeedbackAsync) 39.41 kB - -
@sentry/browser (incl. Metrics) 30.25 kB - -
@sentry/browser (incl. Logs) 30.51 kB - -
@sentry/browser (incl. Metrics & Logs) 31.18 kB - -
@sentry/react 31.08 kB - -
@sentry/react (incl. Tracing) 53.54 kB - -
@sentry/vue 36.74 kB - -
@sentry/vue (incl. Tracing) 53.7 kB - -
@sentry/svelte 29.26 kB - -
CDN Bundle 31.02 kB - -
CDN Bundle (incl. Tracing) 51.77 kB - -
CDN Bundle (incl. Logs, Metrics) 33.29 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 53.75 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74 kB - -
CDN Bundle (incl. Tracing, Replay) 89.36 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.33 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 95.53 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 97.5 kB - -
CDN Bundle - uncompressed 91.66 kB - -
CDN Bundle (incl. Tracing) - uncompressed 154.03 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 98.23 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 159.99 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 227.8 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 273.76 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 279.7 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.46 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 293.39 kB - -
@sentry/nextjs (client) 55.78 kB - -
@sentry/sveltekit (client) 51.59 kB - -
@sentry/core/server 39.99 kB - -
@sentry/core/browser 13.63 kB - -
@sentry/node 141.92 kB +0.01% +13 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.88 kB - -
@sentry/node - without tracing 90.93 kB +0.02% +14 B 🔺
@sentry/node - without channel injection 120.29 kB +0.01% +8 B 🔺
@sentry/aws-serverless 99.17 kB +0.01% +4 B 🔺
@sentry/cloudflare (withSentry) - minified 206.62 kB - -
@sentry/cloudflare (withSentry) 514.02 kB - -

View base workflow run

@mydea
mydea marked this pull request as ready for review September 29, 2026 09:07
@mydea
mydea requested a review from a team as a code owner September 29, 2026 09:07
@mydea
mydea requested review from Lms24 and logaretm and removed request for a team September 29, 2026 09:07

@logaretm logaretm 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.

Seems arbitrary but lgtm

@mydea
mydea merged commit adf0747 into develop Sep 29, 2026
68 checks passed
@mydea
mydea deleted the test/fix-report-page-loaded-flake branch September 29, 2026 11:07
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