[TEST] Multiple exports in OTLP HTTP exporters tests#3771
Merged
marcalff merged 3 commits intoopen-telemetry:mainfrom Dec 3, 2025
Merged
[TEST] Multiple exports in OTLP HTTP exporters tests#3771marcalff merged 3 commits intoopen-telemetry:mainfrom
marcalff merged 3 commits intoopen-telemetry:mainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
This PR modifies OTLP HTTP exporter tests to support multiple export attempts in unit tests, addressing issue #3721. The changes enable tests to handle retryable exports or split batch jobs.
Key Changes
- Changed mock expectations from
.WillOnce()to.WillRepeatedly()to allow multiple export invocations - Added early-return guards to handle empty payloads gracefully
- Introduced counter validation to ensure at least one successful export occurred
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 14 comments.
| File | Description |
|---|---|
| exporters/otlp/test/otlp_http_metric_exporter_test.cc | Updated 6 test methods to support retryable metric exports with counter validation |
| exporters/otlp/test/otlp_http_log_record_exporter_test.cc | Updated 4 test methods to support retryable log exports with counter validation |
| exporters/otlp/test/otlp_http_exporter_test.cc | Updated 4 test methods to support retryable trace exports with counter validation |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3771 +/- ##
=======================================
Coverage 89.93% 89.93%
=======================================
Files 225 225
Lines 7165 7165
=======================================
Hits 6443 6443
Misses 722 722 🚀 New features to boost your workflow:
|
1 task
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.
Fixes #3721
Changes
For significant contributions please make sure you have completed the following items:
CHANGELOG.mdupdated for non-trivial changes