Skip to content
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

Add test for storage-exporter #5078

Merged
merged 18 commits into from
Jan 10, 2024

Conversation

chirag-ghosh
Copy link
Contributor

@chirag-ghosh chirag-ghosh commented Jan 4, 2024

Which problem is this PR solving?

Description of the changes

  • Add tests to storageexporter package

How was this change tested?

Checklist

@chirag-ghosh
Copy link
Contributor Author

The config is set now. However, I am unable to find a way to properly set the Component Host.

@yurishkuro
Copy link
Member

Did you check how exporters are tested in opentelemetry-collector? We should use the same patterns.

@chirag-ghosh chirag-ghosh marked this pull request as ready for review January 5, 2024 19:43
@chirag-ghosh chirag-ghosh requested a review from a team as a code owner January 5, 2024 19:43
@chirag-ghosh chirag-ghosh requested a review from jkowall January 5, 2024 19:43
@chirag-ghosh
Copy link
Contributor Author

The exporters in opentelemetry-collector were using the noop component host from componenttest package. Our exporter however required a host with custom configs. I have tried to do that. Please review.

Signed-off-by: Chirag Ghosh <[email protected]>
Copy link

github-actions bot commented Jan 10, 2024

Test Results

2 086 tests  +3   2 076 ✅ +3   1m 8s ⏱️ ±0s
  220 suites ±0      10 💤 ±0 
    1 files   ±0       0 ❌ ±0 

Results for commit e99083a. ± Comparison against base commit 42304f3.

♻️ This comment has been updated with latest results.

Copy link

codecov bot commented Jan 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (42304f3) 95.59% compared to head (e99083a) 95.55%.
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #5078      +/-   ##
==========================================
- Coverage   95.59%   95.55%   -0.04%     
==========================================
  Files         316      319       +3     
  Lines       18322    18376      +54     
==========================================
+ Hits        17515    17560      +45     
- Misses        648      654       +6     
- Partials      159      162       +3     
Flag Coverage Δ
cassandra-3.x 25.59% <ø> (ø)
cassandra-4.x 25.59% <ø> (ø)
elasticsearch-5.x 19.87% <ø> (ø)
elasticsearch-6.x 19.87% <ø> (+0.01%) ⬆️
elasticsearch-7.x 20.01% <ø> (ø)
elasticsearch-8.x 20.10% <ø> (ø)
grpc-badger 19.51% <ø> (ø)
kafka 14.10% <ø> (ø)
opensearch-1.x 19.99% <ø> (ø)
opensearch-2.x 20.01% <ø> (ø)
unittests 93.25% <ø> (-0.03%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@yurishkuro yurishkuro added the changelog:test Change that's adding missing tests or correcting existing tests label Jan 10, 2024
Signed-off-by: Chirag Ghosh <[email protected]>
@yurishkuro
Copy link
Member

Looks almost ready. See some comments above, and also there are a few error returns that are not covered by tests, can you add them? They look fairly easy to simulate (except f.CreateSpanWriter() call, this might be tricky right now)

@chirag-ghosh
Copy link
Contributor Author

Do you mean like intentionally introducing errors and then test that errors are indeed thrown?

chirag-ghosh and others added 3 commits January 10, 2024 22:18
Signed-off-by: Yuri Shkuro <[email protected]>
Signed-off-by: Yuri Shkuro <[email protected]>
Copy link
Member

@yurishkuro yurishkuro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@yurishkuro yurishkuro merged commit b9f614c into jaegertracing:main Jan 10, 2024
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog:test Change that's adding missing tests or correcting existing tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants