Skip to content

[TEST] Code cleanup in exporter tests - #4158

Merged
dbarker merged 12 commits into
open-telemetry:mainfrom
marcalff:fix_test_cleanup
Sep 2, 2026
Merged

[TEST] Code cleanup in exporter tests#4158
dbarker merged 12 commits into
open-telemetry:mainfrom
marcalff:fix_test_cleanup

Conversation

@marcalff

@marcalff marcalff commented Jun 14, 2026

Copy link
Copy Markdown
Member

Fixes # (issue)

Issue

Exporter unit tests contain:

#ifndef OPENTELEMETRY_STL_VERSION

This:

  • may disable the tests in CI, depending of the setting for STL_VERSION
  • may disable include-what-you-use, likewise
  • may disable clang-tidy, likewise

Note that the iwyu build is using -DOTELCPP_WITH_STL=CXX14, so iwyu was effectively ignoring these tests.

Changes

Please provide a brief description of the changes here.

  • Removed the test on OPENTELEMETRY_STL_VERSION.
    • This was an old work around for an issue in GMock. The work around is no longer necessary.
  • Applied clang-format to the code
  • Resolved all issues reported by include-what-you-use

This ensures that these unit tests are always built and executed.

For significant contributions please make sure you have completed the following items:

  • CHANGELOG.md updated for non-trivial changes
  • Unit tests have been added
  • Changes in public API reviewed

@codecov

codecov Bot commented Jun 14, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.47%. Comparing base (8165c2d) to head (fdc7b3b).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4158      +/-   ##
==========================================
+ Coverage   83.46%   83.47%   +0.01%     
==========================================
  Files         521      521              
  Lines       20380    20380              
==========================================
+ Hits        17009    17011       +2     
+ Misses       3371     3369       -2     
Files with missing lines Coverage Δ
exporters/otlp/src/otlp_grpc_exporter_factory.cc 50.00% <ø> (ø)

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@marcalff
marcalff marked this pull request as ready for review July 10, 2026 20:25
@marcalff
marcalff requested a review from a team as a code owner July 10, 2026 20:25
@marcalff

marcalff commented Sep 1, 2026

Copy link
Copy Markdown
Member Author

@dbarker

Please review

@dbarker dbarker left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good. Thanks.

@dbarker
dbarker merged commit cadb1d6 into open-telemetry:main Sep 2, 2026
77 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants