Skip to content

Commit

Permalink
separate tests that need java 11 in latestDep
Browse files Browse the repository at this point in the history
  • Loading branch information
zeitlinger committed Aug 23, 2024
1 parent 1d68048 commit 25a4d89
Show file tree
Hide file tree
Showing 35 changed files with 54 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
plugins {
id("otel.javaagent-instrumentation")
}
muzzle {
pass {
group.set("javax.servlet")
module.set("javax.servlet-api")
versions.set("[3.0,)")
assertInverse.set(true)
}
fail {
group.set("javax.servlet")
module.set("servlet-api")
versions.set("(,)")
}
}

dependencies {
testImplementation(project(":instrumentation:servlet:servlet-3.0:javaagent"))

compileOnly("javax.servlet:javax.servlet-api:3.0.1")

testInstrumentation(project(":instrumentation:jetty:jetty-8.0:javaagent"))
testImplementation(project(":instrumentation:servlet:servlet-common:bootstrap"))

testLibrary("org.eclipse.jetty:jetty-server:8.0.0.v20110901")
testLibrary("org.eclipse.jetty:jetty-servlet:8.0.0.v20110901")
testLibrary("org.apache.tomcat.embed:tomcat-embed-core:8.0.41")
testLibrary("org.apache.tomcat.embed:tomcat-embed-jasper:8.0.41")

latestDepTestLibrary("org.eclipse.jetty:jetty-server:10.+") // see servlet-5.0 module
latestDepTestLibrary("org.eclipse.jetty:jetty-servlet:10.+") // see servlet-5.0 module

latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-core:9.+") // see servlet-5.0 module
latestDepTestLibrary("org.apache.tomcat.embed:tomcat-embed-jasper:9.+") // see servlet-5.0 module
}

tasks {
withType<Test>().configureEach {
jvmArgs("-Dotel.instrumentation.servlet.experimental.capture-request-parameters=test-parameter")
// required on jdk17
jvmArgs("--add-opens=java.base/java.util=ALL-UNNAMED")
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}
}

val latestDepTest = findProperty("testLatestDeps") as Boolean

if (latestDepTest) {
otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_11)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,3 @@ tasks {
jvmArgs("-XX:+IgnoreUnrecognizedVMOptions")
}
}

val latestDepTest = findProperty("testLatestDeps") as Boolean

if (latestDepTest) {
otelJava {
minJavaVersionSupported.set(JavaVersion.VERSION_11)
}
}
1 change: 1 addition & 0 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -540,6 +540,7 @@ include(":instrumentation:rxjava:rxjava-3-common:testing")
include(":instrumentation:scala-fork-join-2.8:javaagent")
include(":instrumentation:servlet:servlet-2.2:javaagent")
include(":instrumentation:servlet:servlet-3.0:javaagent")
include(":instrumentation:servlet:servlet-3.0:javaagent-tests")
include(":instrumentation:servlet:servlet-3.0:javaagent-unit-tests")
include(":instrumentation:servlet:servlet-5.0:javaagent")
include(":instrumentation:servlet:servlet-5.0:javaagent-unit-tests")
Expand Down

0 comments on commit 25a4d89

Please sign in to comment.