-
Notifications
You must be signed in to change notification settings - Fork 505
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
replace usages of TestSpanExporter with InMemorySpanExporter #1626
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1626 +/- ##
=======================================
- Coverage 69.0% 69.0% -0.1%
=======================================
Files 139 139
Lines 19846 19833 -13
=======================================
- Hits 13703 13693 -10
+ Misses 6143 6140 -3 ☔ View full report in Codecov by Sentry. |
let _result = processor.shutdown(); | ||
assert!(exporter.is_shutdown_called()); | ||
assert!(exporter.get_finished_spans().unwrap().is_empty()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Add a comment saying, we indirectly test shutdown is called, by asserting that spans are empty in inmemoryexporter.
assert!(!exporter.is_shutdown_called()); | ||
let span_data = new_test_export_span_data(); | ||
processor.on_end(span_data.clone()); | ||
assert_eq!(exporter.get_finished_spans().unwrap()[0], span_data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we only need to validate that finished spans is not empty before shutdown, and is empty after shutdown, to keep the test very focused on its purpose.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
Left couple of comments, to be addressed before merge, esp. removing the changelog entry
This reverts commit 1640854.
add comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fix #1616
looks good. Thanks! |
Fixes #
Replaces usages of TestSpanExporter with InMemorySpanExporter
Changes
Please provide a brief description of the changes here.
Merge requirement checklist
CHANGELOG.md
files updated for non-trivial, user-facing changes