Fix flaky test#2412
Merged
Merged
Conversation
0xnm
approved these changes
Nov 22, 2024
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2412 +/- ##
===========================================
+ Coverage 69.86% 69.88% +0.02%
===========================================
Files 766 766
Lines 28483 28483
Branches 4778 4778
===========================================
+ Hits 19898 19904 +6
+ Misses 7264 7260 -4
+ Partials 1321 1319 -2
|
ambushwork
reviewed
Nov 22, 2024
| @FloatForgery(min = 0f, max = 100f) fakeSampleRate: Float | ||
| ) { | ||
| // Given | ||
| println("fakeTraceIds.size: ${fakeTraceIds.size}") |
Contributor
Author
There was a problem hiding this comment.
Indeed we can remove it
| // Then | ||
| assertThat(sampledIn.toFloat()).isCloseTo(traceIds.size * fakeSampleRate / 100f, Offset.offset(7.5f)) | ||
| val offset = 2.5f * fakeTraceIds.size | ||
| assertThat(sampledIn.toFloat()).isCloseTo(fakeTraceIds.size * fakeSampleRate / 100f, Offset.offset(offset)) |
Member
There was a problem hiding this comment.
Note:
This might reduce the chance of flakiness, but can't completely avoid the test fail in my opinion
Let's keep it this way and see if it still fails
ambushwork
approved these changes
Nov 22, 2024
xgouchet
force-pushed
the
xgouchet/flaky_deterministic_tests
branch
from
November 22, 2024 14:16
eebd094 to
e964187
Compare
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.
No description provided.