Skip to content

[TEST] Only run the multi_observer_test when building with ABI v2#3982

Merged
dbarker merged 2 commits intoopen-telemetry:mainfrom
dbarker:test_run_multiobserver_only_on_abiv2
Apr 12, 2026
Merged

[TEST] Only run the multi_observer_test when building with ABI v2#3982
dbarker merged 2 commits intoopen-telemetry:mainfrom
dbarker:test_run_multiobserver_only_on_abiv2

Conversation

@dbarker
Copy link
Copy Markdown
Member

@dbarker dbarker commented Apr 10, 2026

The MultiObserverTest cases require ABI v2, however ctest attempts to run test even when CMake is configured with ABI v1.

gtest_add_tests() scans source files with regex at configure time, ignoring #ifdef guards. The four MultiObserverTest cases run and fail locally in the devcontainer (ie: ./ci/do_ci.sh cmake.maintainer.async.test).

The following tests FAILED:
        480 - metrics.MultiObserverTest.BasicMultiObservableCallback (Failed)
        481 - metrics.MultiObserverTest.EmptyInstrumentsList (Failed)
        482 - metrics.MultiObserverTest.NonRegisteredInstrument (Failed)
        483 - metrics.MultiObserverTest.CallbackDeregisteredWhenInstrumentDestroyed (Failed)

Changes

  • Only add the test when ABI >= 2 in CMakeLists.txt.

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

@dbarker dbarker marked this pull request as ready for review April 10, 2026 19:03
@dbarker dbarker requested a review from a team as a code owner April 10, 2026 19:03
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.17%. Comparing base (90d9173) to head (7b09373).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #3982      +/-   ##
==========================================
- Coverage   90.18%   90.17%   -0.01%     
==========================================
  Files         230      230              
  Lines        7299     7299              
==========================================
- Hits         6582     6581       -1     
- Misses        717      718       +1     

see 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.

Copy link
Copy Markdown
Member

@marcalff marcalff left a comment

Choose a reason for hiding this comment

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

LGTM, thanks for the fix.

@dbarker dbarker merged commit 34b4bae into open-telemetry:main Apr 12, 2026
68 checks passed
@dbarker dbarker deleted the test_run_multiobserver_only_on_abiv2 branch April 12, 2026 22:50
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