Skip to content

test(replay): Add test for session max age handling #7362

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 8, 2023

Conversation

mydea
Copy link
Member

@mydea mydea commented Mar 7, 2023

This adds an integration tests to check that a session is correctly re-started after the max age is reached.

@mydea mydea added Type: Tests Package: replay Issues related to the Sentry Replay SDK labels Mar 7, 2023
@mydea mydea requested a review from Lms24 March 7, 2023 09:15
@mydea mydea self-assigned this Mar 7, 2023
@github-actions
Copy link
Contributor

github-actions bot commented Mar 7, 2023

size-limit report 📦

Path Size
@sentry/browser - ES5 CDN Bundle (gzipped + minified) 20.12 KB (-0.03% 🔽)
@sentry/browser - ES5 CDN Bundle (minified) 62.51 KB (-0.05% 🔽)
@sentry/browser - ES6 CDN Bundle (gzipped + minified) 18.76 KB (-0.02% 🔽)
@sentry/browser - ES6 CDN Bundle (minified) 55.49 KB (-0.06% 🔽)
@sentry/browser - Webpack (gzipped + minified) 20.5 KB (0%)
@sentry/browser - Webpack (minified) 66.99 KB (0%)
@sentry/react - Webpack (gzipped + minified) 20.53 KB (0%)
@sentry/nextjs Client - Webpack (gzipped + minified) 48.28 KB (+0.16% 🔺)
@sentry/browser + @sentry/tracing - ES5 CDN Bundle (gzipped + minified) 27.26 KB (+0.2% 🔺)
@sentry/browser + @sentry/tracing - ES6 CDN Bundle (gzipped + minified) 25.52 KB (+0.22% 🔺)
@sentry/replay ES6 CDN Bundle (gzipped + minified) 43.11 KB (+0.11% 🔺)
@sentry/replay - Webpack (gzipped + minified) 37.15 KB (+0.14% 🔺)
@sentry/browser + @sentry/tracing + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 60.9 KB (+0.17% 🔺)
@sentry/browser + @sentry/replay - ES6 CDN Bundle (gzipped + minified) 54.22 KB (+0.07% 🔺)

@mydea mydea force-pushed the fn/session-max-age-test branch 3 times, most recently from 59be88a to f293131 Compare March 7, 2023 14:27
@mydea mydea force-pushed the fn/session-max-age-test branch from f293131 to 25ecbd0 Compare March 7, 2023 15:34
@mydea mydea marked this pull request as ready for review March 7, 2023 15:34
@mydea
Copy link
Member Author

mydea commented Mar 7, 2023

Fixed the flakiness 🎉
Also refactored the test helper to get the replay container in a way that we do not need to keep some more stuff (_isPaused etc.) unscrambled, by using the public APIs in page.evaluate to instead build this for us - nicer anyhow, and more truthful as we didn't really have a ReplayContainer as a result of this anyhow.

@mydea mydea requested a review from billyvg March 7, 2023 15:35
Copy link
Member

@billyvg billyvg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this add much over our existing unit/integration tests? I think it's ok to add this, but these tests are a bit slower and the seconds will start adding up esp since we run it per browser.

@mydea
Copy link
Member Author

mydea commented Mar 8, 2023

Does this add much over our existing unit/integration tests? I think it's ok to add this, but these tests are a bit slower and the seconds will start adding up esp since we run it per browser.

We can always look at this again later. IMHO for now it is good to have this to ensure we don't regress here!

@mydea mydea merged commit e8fe668 into develop Mar 8, 2023
@mydea mydea deleted the fn/session-max-age-test branch March 8, 2023 08:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Package: replay Issues related to the Sentry Replay SDK Type: Tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants