Strengthen graal incubating-not-found test to detect incubator API on classpath
Fixes #8509
Description
incubatingApiIsNotFoundViaReflection()assertedisInstanceOf(Logger/Tracer/LongCounterBuilder.class)on the noop instances. The incubatorExtended*noops subtype those stable types, so the assertions hold even when an incubator noop is returned — the test never checks what its name claims.- Assert instead that the noop runtime class is not under
io.opentelemetry.api.incubator.*, which fails if:api:incubatoris wrongly added to this module (the regression it guards). A package-name check is used because the module does not depend on:api:incubatorand cannot reference theExtended*types directly. - Mirrors the sibling
graal-incubatingIncubatingApiTests.incubatingApiIsLoadedViaReflection(), which asserts theExtended*subtypes are present. The file was added by open-telemetry/opentelemetry-java#6617 as the no-CCE safety net.
Testing done
- The test has no
@EnabledInNativeImage, so it runs on the regular JVMtesttask, not native-CI-only. ./gradlew :integration-tests:graal:check— passed (test + spotlessCheck + checkstyle).- No CHANGELOG/apidiff: test-only change in a non-published module, no behavior or API change.
Codecov Report
:white_check_mark: All modified and coverable lines are covered by tests.
:white_check_mark: Project coverage is 78.77%. Comparing base (824334c) to head (9e4a418).
:warning: Report is 70 commits behind head on main.
Additional details and impacted files
@@ Coverage Diff @@
## main #8510 +/- ##
=========================================
Coverage 78.77% 78.77%
Complexity 8579 8579
=========================================
Files 1009 1009
Lines 28993 28993
Branches 3599 3599
=========================================
Hits 22839 22839
Misses 5311 5311
Partials 843 843
:umbrella: View full report in Codecov by Harness.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
This has been automatically marked as stale because it has been marked as needing author feedback and has not had any activity for 7 days. It will be closed if no further activity occurs within 7 days of this comment.
Thank you for your contribution @thswlsqls! 🎉 We would like to hear from you about your experience contributing to OpenTelemetry by taking a few minutes to fill out this survey.