Was working on adding OSGi support for opentelemetry-java and research led me to find that micrometer supports it and tests its support here: https://github.com/micrometer-metrics/micrometer/tree/main/micrometer-osgi-test
In my implementation effort I was seeing weird behavior where I setup a test to blatantly fail and the build was still passing. In an attempt to find the root cause, I tried to compare / contrast with micrometer and found that micrometer-osgi-test has the same problem!
To recreate, change the test to fail, like here, and notice that running ./gradlew :micrometer-osgi-test:test still succeeds.
Didn't have time to track down the exact cause for micrometer, but for opentelemetry-java, the key bit was here: https://github.com/open-telemetry/opentelemetry-java/pull/7964/changes#diff-2a792e194b8d6465c4f4caea2a7f31fc6179a196def02b0dc07f19d97734ba48R41-R43
Changing the micrometer-osgi-test junit dependency from testImplementation to implementation did not fix the issue like it did for me:
implementation libs.junitJupiter
So there's something weird going. I don't know exactly what it is, but I thought I'd open an issue to let you know your osgi tests aren't to be trusted right now! 😬
Was working on adding OSGi support for opentelemetry-java and research led me to find that micrometer supports it and tests its support here: https://github.com/micrometer-metrics/micrometer/tree/main/micrometer-osgi-test
In my implementation effort I was seeing weird behavior where I setup a test to blatantly fail and the build was still passing. In an attempt to find the root cause, I tried to compare / contrast with micrometer and found that micrometer-osgi-test has the same problem!
To recreate, change the test to fail, like here, and notice that running
./gradlew :micrometer-osgi-test:teststill succeeds.Didn't have time to track down the exact cause for micrometer, but for opentelemetry-java, the key bit was here: https://github.com/open-telemetry/opentelemetry-java/pull/7964/changes#diff-2a792e194b8d6465c4f4caea2a7f31fc6179a196def02b0dc07f19d97734ba48R41-R43
Changing the micrometer-osgi-test junit dependency from testImplementation to implementation did not fix the issue like it did for me:
So there's something weird going. I don't know exactly what it is, but I thought I'd open an issue to let you know your osgi tests aren't to be trusted right now! 😬