-
Notifications
You must be signed in to change notification settings - Fork 821
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
chore(otlp-exporter-*-grpc): clean up tests #5196
Merged
pichlermarc
merged 8 commits into
open-telemetry:main
from
dynatrace-oss-contrib:chore/cleanup-otlp-grpc-exporter-tests
Nov 26, 2024
Merged
chore(otlp-exporter-*-grpc): clean up tests #5196
pichlermarc
merged 8 commits into
open-telemetry:main
from
dynatrace-oss-contrib:chore/cleanup-otlp-grpc-exporter-tests
Nov 26, 2024
Conversation
This file contains 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
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5196 +/- ##
=======================================
Coverage 94.59% 94.59%
=======================================
Files 314 314
Lines 7993 7993
Branches 1611 1611
=======================================
Hits 7561 7561
Misses 432 432 |
This was referenced Nov 25, 2024
trentm
approved these changes
Nov 26, 2024
pichlermarc
commented
Nov 26, 2024
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.
Which problem is this PR solving?
All the functionality that's duplicate-tested in all the gRPC exporters is now tested in the exporter base packages as well as in
@opentelemetry/otlp-transformer
for serialization.This PR removes the tests from the individual exporters and replaces them with a simple check that tests if
The previous implementation was heavily relying on constructing export data and asserting the data that is sent, which makes changes to the SDK's internal structure very difficult. This testing is now all handled in
@opentelemetry/otlp-transformer
so there should be no need to test this again in every individual exporter. The tests had an additional check that ensured that the export also works via Unix domain sockets, so I added another test in the@opentelemtry/otlp-grpc-exporter
base package to avoid loosing coverage there.I also added a comment for future contributors that this tests file is not where they should add any tests that concern base components.
Partially enables #4583 (types exported from
@opentelemetry/otlp-transformer
are used in testing, by removing test usages, we can remove types that were only used in tests from the public API)Type of change
How Has This Been Tested?