Migrate test sets in context module to new test suites. (#3788)
This commit is contained in:
parent
57888c55e4
commit
c143a59517
|
@ -184,21 +184,6 @@ dependencies {
|
|||
compileOnly("com.google.auto.value:auto-value-annotations")
|
||||
compileOnly("com.google.code.findbugs:jsr305")
|
||||
|
||||
testCompileOnly("com.google.auto.value:auto-value-annotations")
|
||||
testCompileOnly("com.google.errorprone:error_prone_annotations")
|
||||
testCompileOnly("com.google.code.findbugs:jsr305")
|
||||
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-api")
|
||||
testImplementation("org.junit.jupiter:junit-jupiter-params")
|
||||
testImplementation("nl.jqno.equalsverifier:equalsverifier")
|
||||
testImplementation("org.mockito:mockito-core")
|
||||
testImplementation("org.mockito:mockito-junit-jupiter")
|
||||
testImplementation("org.assertj:assertj-core")
|
||||
testImplementation("org.awaitility:awaitility")
|
||||
testImplementation("io.github.netmikey.logunit:logunit-jul")
|
||||
|
||||
testRuntimeOnly("org.junit.jupiter:junit-jupiter-engine")
|
||||
|
||||
errorprone("com.google.errorprone:error_prone_core")
|
||||
errorprone("com.uber.nullaway:nullaway")
|
||||
|
||||
|
@ -208,3 +193,26 @@ dependencies {
|
|||
// see: https://github.com/grpc/grpc-java/issues/3633
|
||||
compileOnly("javax.annotation:javax.annotation-api")
|
||||
}
|
||||
|
||||
testing {
|
||||
suites.withType(JvmTestSuite::class).configureEach {
|
||||
dependencies {
|
||||
implementation(project)
|
||||
|
||||
compileOnly("com.google.auto.value:auto-value-annotations")
|
||||
compileOnly("com.google.errorprone:error_prone_annotations")
|
||||
compileOnly("com.google.code.findbugs:jsr305")
|
||||
|
||||
implementation("org.junit.jupiter:junit-jupiter-api")
|
||||
implementation("org.junit.jupiter:junit-jupiter-params")
|
||||
implementation("nl.jqno.equalsverifier:equalsverifier")
|
||||
implementation("org.mockito:mockito-core")
|
||||
implementation("org.mockito:mockito-junit-jupiter")
|
||||
implementation("org.assertj:assertj-core")
|
||||
implementation("org.awaitility:awaitility")
|
||||
implementation("io.github.netmikey.logunit:logunit-jul")
|
||||
|
||||
runtimeOnly("org.junit.jupiter:junit-jupiter-engine")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -3,36 +3,13 @@ plugins {
|
|||
id("otel.publish-conventions")
|
||||
|
||||
id("otel.jmh-conventions")
|
||||
id("org.unbroken-dome.test-sets")
|
||||
id("otel.animalsniffer-conventions")
|
||||
}
|
||||
|
||||
description = "OpenTelemetry Context (Incubator)"
|
||||
otelJava.moduleName.set("io.opentelemetry.context")
|
||||
|
||||
testSets {
|
||||
create("grpcInOtelTest")
|
||||
create("otelInGrpcTest")
|
||||
|
||||
create("braveInOtelTest")
|
||||
create("otelInBraveTest")
|
||||
create("otelAsBraveTest")
|
||||
|
||||
create("storageWrappersTest")
|
||||
|
||||
create("strictContextEnabledTest")
|
||||
}
|
||||
|
||||
dependencies {
|
||||
add("grpcInOtelTestImplementation", "io.grpc:grpc-context")
|
||||
add("otelInGrpcTestImplementation", "io.grpc:grpc-context")
|
||||
|
||||
add("braveInOtelTestImplementation", "io.zipkin.brave:brave")
|
||||
add("otelAsBraveTestImplementation", "io.zipkin.brave:brave")
|
||||
add("otelInBraveTestImplementation", "io.zipkin.brave:brave")
|
||||
|
||||
add("strictContextEnabledTestImplementation", project(":api:all"))
|
||||
|
||||
// MustBeClosed
|
||||
compileOnly("com.google.errorprone:error_prone_annotations")
|
||||
|
||||
|
@ -41,15 +18,59 @@ dependencies {
|
|||
testImplementation("org.junit-pioneer:junit-pioneer")
|
||||
}
|
||||
|
||||
tasks {
|
||||
named<Test>("strictContextEnabledTest") {
|
||||
jvmArgs("-Dio.opentelemetry.context.enableStrictContext=true")
|
||||
}
|
||||
testing {
|
||||
suites {
|
||||
val grpcInOtelTest by registering(JvmTestSuite::class) {
|
||||
dependencies {
|
||||
implementation("io.grpc:grpc-context")
|
||||
}
|
||||
}
|
||||
|
||||
named("check") {
|
||||
dependsOn(
|
||||
"grpcInOtelTest", "otelInGrpcTest", "braveInOtelTest", "otelInBraveTest",
|
||||
"otelAsBraveTest", "storageWrappersTest", "strictContextEnabledTest"
|
||||
)
|
||||
val otelInGrpcTest by registering(JvmTestSuite::class) {
|
||||
dependencies {
|
||||
implementation("io.grpc:grpc-context")
|
||||
}
|
||||
}
|
||||
|
||||
val braveInOtelTest by registering(JvmTestSuite::class) {
|
||||
dependencies {
|
||||
implementation("io.zipkin.brave:brave")
|
||||
}
|
||||
}
|
||||
|
||||
val otelInBraveTest by registering(JvmTestSuite::class) {
|
||||
dependencies {
|
||||
implementation("io.zipkin.brave:brave")
|
||||
}
|
||||
}
|
||||
|
||||
val otelAsBraveTest by registering(JvmTestSuite::class) {
|
||||
dependencies {
|
||||
implementation("io.zipkin.brave:brave")
|
||||
}
|
||||
}
|
||||
|
||||
val storageWrappersTest by registering(JvmTestSuite::class) {
|
||||
}
|
||||
|
||||
val strictContextEnabledTest by registering(JvmTestSuite::class) {
|
||||
dependencies {
|
||||
implementation(project(":api:all"))
|
||||
}
|
||||
|
||||
targets {
|
||||
all {
|
||||
testTask.configure {
|
||||
jvmArgs("-Dio.opentelemetry.context.enableStrictContext=true")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
tasks {
|
||||
named("check") {
|
||||
dependsOn(testing.suites)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue