Fix OSGi test setup: version syntax typo and testingBundle classpath#25
Open
zeitlinger wants to merge 2 commits intojack-berg:osgi-supportfrom
Open
Fix OSGi test setup: version syntax typo and testingBundle classpath#25zeitlinger wants to merge 2 commits intojack-berg:osgi-supportfrom
zeitlinger wants to merge 2 commits intojack-berg:osgi-supportfrom
Conversation
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
Signed-off-by: Gregor Zeitlinger <gregor.zeitlinger@grafana.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two small fixes found during review of open-telemetry#7964 (open-telemetry/opentelemetry-java).
Fix 1: Missing
=in version constraint stringIn
otel.java-conventions.gradle.kts, the Kotlin string producedversion"${@}"instead ofversion="${@}"— a one-character typo. The test bundle in this same PR had it right; the conventions file didn't.BND's lenient parser accepts both forms so the generated manifest is correct either way, but the code is wrong and inconsistent.
Fix 2:
testingBundleclasspath causes silent test no-opsThe
Bundletask usescompileClasspathby default for BND analysis. This meanstestImplementationdependencies are invisible to BND — including the@Testableannotation needed by theTest-Casesmacro. With JUnit intestImplementation, BND can't resolve@Testable, theTest-Casesheader comes out empty, 0 tests are discovered, and the task reports success regardless of whether any assertions would have failed.Fix: add
classpath(sourceSets.test.get().runtimeClasspath)totestingBundleTask, which makestestImplementationdeps visible to BND and allowsjunit-jupiterto move back totestImplementationwhere it belongs.