Fix RumSessionEnded metric flaky test#2114
Merged
Merged
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2114 +/- ##
===========================================
- Coverage 69.84% 69.67% -0.17%
===========================================
Files 715 715
Lines 26577 26590 +13
Branches 4457 4458 +1
===========================================
- Hits 18561 18525 -36
- Misses 6821 6838 +17
- Partials 1195 1227 +32 |
0xnm
reviewed
Jun 28, 2024
ambushwork
force-pushed
the
yl/fix-rum-session-ended-flanky-test
branch
from
June 28, 2024 08:48
e486199 to
15e7882
Compare
mariusc83
reviewed
Jun 28, 2024
| val sessionEndedMetric = | ||
| SessionEndedMetric(fakeSessionId, fakeStartReason, fakeNtpOffsetAtStart, backgroundEventTracking) | ||
| val backgroundViewCount = forge.anInt(min = 1, max = events.size) | ||
| val backgroundViewCount = forge.anInt(min = 1, max = events.size + 1) |
Member
There was a problem hiding this comment.
is there any possibility that events.size ==0 ? In that case that function will throw a RuntimeException.
Member
Author
There was a problem hiding this comment.
as @0xnm explained, @Forgery events: List<ViewEvent> will not generate empty list, and I made some pressure test with 500 repeats, I didn't see any exception on that.
0xnm
approved these changes
Jun 28, 2024
xgouchet
approved these changes
Jun 28, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
Fix the min boundary of generating the int for unit test.
Review checklist (to be filled by reviewers)