11import aQute.bnd.gradle.Bundle
22import aQute.bnd.gradle.Resolve
33import aQute.bnd.gradle.TestOSGi
4+ import java.time.Duration
45
56plugins {
67 id(" otel.java-conventions" )
@@ -13,19 +14,6 @@ otelJava.moduleName.set("io.opentelemetry.integration.tests.osgi")
1314// https://github.com/micrometer-metrics/micrometer/tree/main/micrometer-osgi-test
1415// https://github.com/eclipse-osgi-technology/osgi-test/tree/main/examples/osgi-test-example-gradle
1516
16- configurations.all {
17- resolutionStrategy {
18- // BND not compatible with JUnit 5.13+; see https://github.com/bndtools/bnd/issues/6651
19- val junitVersion = " 5.14.4"
20- val junitLauncherVersion = " 1.14.4"
21- force(" org.junit.jupiter:junit-jupiter:$junitVersion " )
22- force(" org.junit.jupiter:junit-jupiter-api:$junitVersion " )
23- force(" org.junit.jupiter:junit-jupiter-params:$junitVersion " )
24- force(" org.junit.jupiter:junit-jupiter-engine:$junitVersion " )
25- force(" org.junit.platform:junit-platform-launcher:$junitLauncherVersion " )
26- }
27- }
28-
2917dependencies {
3018 // Testing the "kitchen sink" hides OSGi configuration issues. For example, opentelemetry-api has
3119 // optional dependencies on :sdk-extensions:autoconfigure and :api:incubator. If we only test a
@@ -80,6 +68,7 @@ val testOSGiTask = tasks.register<TestOSGi>("testOSGi") {
8068 group = JavaBasePlugin .VERIFICATION_GROUP
8169 bndrun = resolveTask.flatMap { it.outputBndrun }
8270 bundles = files(sourceSets.test.get().runtimeClasspath, testingBundleTask.get().archiveFile)
71+ timeout.set(Duration .ofMinutes(2 ))
8372 // BND reports success when zero tests ran (e.g. if bundles failed to start). Fail explicitly.
8473 val testResultsDir = layout.buildDirectory.dir(" test-results/testOSGi" )
8574 doLast {
0 commit comments