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

Conver vertx tests to test suites #7932

Merged
merged 1 commit into from
Mar 1, 2023
Merged
Show file tree
Hide file tree
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 @@ -11,44 +10,52 @@ muzzle {
}
}

testSets {
create("version35Test")
create("latestDepTest")
}

tasks {
test {
dependsOn("version35Test")
}
}

// The first Vert.x version that uses rx-java 2
val vertxVersion = "3.5.0"

dependencies {
compileOnly("io.vertx:vertx-web:$vertxVersion")
compileOnly("io.vertx:vertx-rx-java2:$vertxVersion")

testCompileOnly("io.vertx:vertx-codegen:$vertxVersion")

testInstrumentation(project(":instrumentation:jdbc:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:rxjava:rxjava-2.0:javaagent"))
testInstrumentation(project(":instrumentation:vertx:vertx-http-client:vertx-http-client-3.0:javaagent"))
testInstrumentation(project(":instrumentation:vertx:vertx-http-client:vertx-http-client-4.0:javaagent"))
testInstrumentation(project(":instrumentation:vertx:vertx-web-3.0:javaagent"))
}

testImplementation("org.hsqldb:hsqldb:2.3.4")

add("version35TestImplementation", "io.vertx:vertx-web:$vertxVersion")
add("version35TestImplementation", "io.vertx:vertx-rx-java2:$vertxVersion")
add("version35TestImplementation", "io.vertx:vertx-web-client:$vertxVersion")
add("version35TestImplementation", "io.vertx:vertx-jdbc-client:$vertxVersion")
add("version35TestImplementation", "io.vertx:vertx-circuit-breaker:$vertxVersion")
testing {
suites {
val version35Test by registering(JvmTestSuite::class) {
dependencies {
implementation("org.hsqldb:hsqldb:2.3.4")

compileOnly("io.vertx:vertx-codegen:$vertxVersion")
implementation("io.vertx:vertx-web:$vertxVersion")
implementation("io.vertx:vertx-rx-java2:$vertxVersion")
implementation("io.vertx:vertx-web-client:$vertxVersion")
implementation("io.vertx:vertx-jdbc-client:$vertxVersion")
implementation("io.vertx:vertx-circuit-breaker:$vertxVersion")
}
}

val latestDepTest by registering(JvmTestSuite::class) {
dependencies {
implementation("org.hsqldb:hsqldb:2.3.4")

implementation("io.vertx:vertx-web:+")
implementation("io.vertx:vertx-rx-java2:+")
implementation("io.vertx:vertx-web-client:+")
implementation("io.vertx:vertx-jdbc-client:+")
implementation("io.vertx:vertx-circuit-breaker:+")
}
}
}
}

add("latestDepTestImplementation", "io.vertx:vertx-web:4.+")
add("latestDepTestImplementation", "io.vertx:vertx-rx-java2:4.+")
add("latestDepTestImplementation", "io.vertx:vertx-web-client:4.+")
add("latestDepTestImplementation", "io.vertx:vertx-jdbc-client:4.+")
add("latestDepTestImplementation", "io.vertx:vertx-circuit-breaker:4.+")
tasks {
check {
dependsOn(testing.suites)
}
}
50 changes: 29 additions & 21 deletions instrumentation/vertx/vertx-web-3.0/javaagent/build.gradle.kts
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 @@ -12,33 +11,42 @@ muzzle {
}
}

testSets {
create("version3Test")
create("latestDepTest")
}

tasks {
test {
dependsOn("version3Test")
}
}

dependencies {
compileOnly("io.vertx:vertx-web:3.0.0")

// We need both version as different versions of Vert.x use different versions of Netty
testInstrumentation(project(":instrumentation:netty:netty-4.0:javaagent"))
testInstrumentation(project(":instrumentation:netty:netty-4.1:javaagent"))
testInstrumentation(project(":instrumentation:jdbc:javaagent"))
}

testImplementation(project(":instrumentation:vertx:vertx-web-3.0:testing"))

add("version3TestImplementation", "io.vertx:vertx-web:3.0.0")
add("version3TestImplementation", "io.vertx:vertx-jdbc-client:3.0.0")
add("version3TestImplementation", "io.vertx:vertx-codegen:3.0.0")
add("version3TestImplementation", "io.vertx:vertx-docgen:3.0.0")
testing {
suites {
val version3Test by registering(JvmTestSuite::class) {
dependencies {
implementation(project(":instrumentation:vertx:vertx-web-3.0:testing"))

implementation("io.vertx:vertx-web:3.0.0")
implementation("io.vertx:vertx-jdbc-client:3.0.0")
implementation("io.vertx:vertx-codegen:3.0.0")
implementation("io.vertx:vertx-docgen:3.0.0")
}
}

val latestDepTest by registering(JvmTestSuite::class) {
dependencies {
implementation(project(":instrumentation:vertx:vertx-web-3.0:testing"))

implementation("io.vertx:vertx-web:+")
implementation("io.vertx:vertx-jdbc-client:+")
implementation("io.vertx:vertx-codegen:+")
}
}
}
}

add("latestDepTestImplementation", "io.vertx:vertx-web:4.+")
add("latestDepTestImplementation", "io.vertx:vertx-jdbc-client:4.+")
add("latestDepTestImplementation", "io.vertx:vertx-codegen:4.+")
tasks {
check {
dependsOn(testing.suites)
}
}