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

Integration test for non tokio main #2520

Merged
merged 8 commits into from
Jan 17, 2025

Conversation

cijothomas
Copy link
Member

Fixes #2402
Design discussion issue (if applicable) #

Changes

Please provide a brief description of the changes here.

Merge requirement checklist

  • CONTRIBUTING guidelines followed
  • Unit tests added/updated (if applicable)
  • Appropriate CHANGELOG.md files updated for non-trivial, user-facing changes
  • Changes in public API reviewed (if applicable)

@cijothomas cijothomas requested a review from a team as a code owner January 15, 2025 21:24
@cijothomas cijothomas added the integration tests Run integration tests label Jan 15, 2025
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.9%. Comparing base (c51c4b2) to head (5401350).
Report is 1 commits behind head on main.

Additional details and impacted files
@@          Coverage Diff          @@
##            main   #2520   +/-   ##
=====================================
  Coverage   77.9%   77.9%           
=====================================
  Files        123     123           
  Lines      22944   22944           
=====================================
  Hits       17880   17880           
  Misses      5064    5064           

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

@cijothomas cijothomas marked this pull request as draft January 16, 2025 00:40
@cijothomas
Copy link
Member Author

marking draft to fix and isolate the test.

@cijothomas cijothomas marked this pull request as ready for review January 16, 2025 21:33
let mut contents = String::new();
let mut reader = std::io::BufReader::new(&file);
reader.read_to_string(&mut contents)?;
assert!(contents.contains(expected_content));
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't compare the complete JSON, but only the UUID attribute?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is the right approach in that case. The test should be capable to validate all the attributes of different types.

Copy link
Member

@lalitb lalitb Jan 16, 2025

Choose a reason for hiding this comment

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

I added an alternate approach here - #2521 - running the tests serially with json truncate at start, and letting it validate the complete JSON. We can keep the existing tests as it is, and add new tests to only validate the uuid attribute. This way we have both the scenarios tested?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes, we need that too. This one is to quickly validate that the shutdown issues are indeed fixed

@cijothomas cijothomas merged commit 27410b0 into open-telemetry:main Jan 17, 2025
21 checks passed
@cijothomas cijothomas deleted the cijothomas/fix-int branch January 17, 2025 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
integration tests Run integration tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Validate tonic can be used in blocking scenarios/non-tokio context
2 participants