Convert spring-jms tests to test suites (#7945)
Part of https://github.com/open-telemetry/opentelemetry-java-instrumentation/issues/7911
This commit is contained in:
parent
0a9466523f
commit
c721852d5f
|
@ -1,6 +1,5 @@
|
|||
plugins {
|
||||
id("otel.javaagent-instrumentation")
|
||||
id("org.unbroken-dome.test-sets")
|
||||
}
|
||||
|
||||
muzzle {
|
||||
|
@ -14,23 +13,6 @@ muzzle {
|
|||
}
|
||||
}
|
||||
|
||||
testSets {
|
||||
create("testReceiveSpansDisabled")
|
||||
}
|
||||
|
||||
tasks {
|
||||
test {
|
||||
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
|
||||
jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
|
||||
}
|
||||
|
||||
val testReceiveSpansDisabled by existing
|
||||
|
||||
check {
|
||||
dependsOn(testReceiveSpansDisabled)
|
||||
}
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation(project(":instrumentation:jms:jms-common:javaagent"))
|
||||
implementation(project(":instrumentation:jms:jms-1.1:javaagent"))
|
||||
|
@ -54,7 +36,35 @@ dependencies {
|
|||
}
|
||||
|
||||
latestDepTestLibrary("org.springframework:spring-jms:5.+")
|
||||
|
||||
// this is just to avoid a bit more copy-pasting
|
||||
add("testReceiveSpansDisabledImplementation", sourceSets["test"].output)
|
||||
}
|
||||
|
||||
testing {
|
||||
suites {
|
||||
val testReceiveSpansDisabled by registering(JvmTestSuite::class) {
|
||||
dependencies {
|
||||
// this is just to avoid a bit more copy-pasting
|
||||
implementation(project.sourceSets["test"].output)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
named("testReceiveSpansDisabledImplementation") {
|
||||
extendsFrom(configurations["testImplementation"])
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
withType<Test>().configureEach {
|
||||
usesService(gradle.sharedServices.registrations["testcontainersBuildService"].service)
|
||||
}
|
||||
// this does not apply to testReceiveSpansDisabled
|
||||
test {
|
||||
jvmArgs("-Dotel.instrumentation.messaging.experimental.receive-telemetry.enabled=true")
|
||||
}
|
||||
|
||||
check {
|
||||
dependsOn(testing.suites)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue