Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Convert spring-jms tests to test suites #7945

Merged
merged 1 commit into from
Mar 1, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
plugins {
id("otel.javaagent-instrumentation")
id("org.unbroken-dome.test-sets")
}

muzzle {
Expand All @@ -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"))
Expand All @@ -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)
}
}