Fix flaky tests in OtelTraceWriter#2571
Merged
Merged
Conversation
jonathanmos
force-pushed
the
jmoskovich/fix-flaky-otel-test
branch
from
March 28, 2025 11:49
40f02d4 to
b37fe3e
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2571 +/- ##
===========================================
+ Coverage 70.14% 70.18% +0.04%
===========================================
Files 803 803
Lines 30146 30146
Branches 5046 5046
===========================================
+ Hits 21145 21157 +12
- Misses 7600 7602 +2
+ Partials 1401 1387 -14 🚀 New features to boost your workflow:
|
jonathanmos
marked this pull request as ready for review
March 28, 2025 13:06
0xnm
previously approved these changes
Mar 28, 2025
Comment on lines
+317
to
+321
| var spans = emptyList<DDSpan>() | ||
| while (spans.isEmpty()) { | ||
| spans = forge.aList { getForgery<DDSpan>() } | ||
| .filter(predicate) | ||
| } |
Member
There was a problem hiding this comment.
we can also use approach which @aleksandr-gringauz did in #2565 (there it is a bit more flexible), but here it is also okay
jonathanmos
force-pushed
the
jmoskovich/fix-flaky-otel-test
branch
from
March 28, 2025 14:38
b37fe3e to
6ecc107
Compare
0xnm
approved these changes
Mar 28, 2025
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?
Some tests in the OtelTraceWriter are flaky because of the method used to generate lists of DDSpans. In some cases, all the elements of the list can be filtered out leaving empty lists, and this causes the tests to fail.
Solution: ensure the list of spans generated by the tests is not empty.
Motivation
Flakiness noticed in the tests.
Additional Notes
Anything else we should know when reviewing?
Review checklist (to be filled by reviewers)