Skip to content

Commit

Permalink
Update tomcat smoke tests to run against Java 17 (#4233)
Browse files Browse the repository at this point in the history
* Update tomcat smoke tests

* Fix

* Tomcat 10 on Java 8 is failing

* Fix wildfly

* Hopefully last fix
  • Loading branch information
trask authored Sep 29, 2021
1 parent be090e4 commit 635acd4
Show file tree
Hide file tree
Showing 8 changed files with 32 additions and 28 deletions.
7 changes: 4 additions & 3 deletions smoke-tests/matrix/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ def linuxTargets = [
[version: ["7.0.109"], vm: ["hotspot"], jdk: ["8"], args: [tagSuffix: ""]],
[version: ["7.0.109"], vm: ["openj9"], jdk: ["8"], args: [tagSuffix: "-adoptopenjdk-openj9"]],
[version: ["8.5.71", "9.0.53"], vm: ["hotspot"], jdk: ["8", "11", "17"], args: [tagSuffix: ""]],
// 8.5.70 and 9.0.52 are the latest tomcat images published with openj9 (and there's no jdk 17)
// 8.5.70 and 9.0.52 are the latest tomcat images published with openj9 (and there's no openj9 image for jdk 17)
[version: ["8.5.70", "9.0.52"], vm: ["openj9"], jdk: ["8", "11"], args: [tagSuffix: "-adoptopenjdk-openj9"]],
[version: ["10.0.11"], vm: ["hotspot"], jdk: ["8", "11", "17"], args: [tagSuffix: ""], war: "servlet-5.0"],
// 10.0.8 is the latest tomcat image published with openj9 (and there's no jdk 17)
// 10.0.8 is the latest tomcat image published with openj9 (and there's no openj9 image for jdk 17)
[version: ["10.0.8"], vm: ["openj9"], jdk: ["8", "11"], args: [tagSuffix: "-adoptopenjdk-openj9"], war: "servlet-5.0"]
],
"tomee" : [
Expand All @@ -60,7 +60,8 @@ def linuxTargets = [
],
"wildfly": [
[version: ["13.0.0.Final"], vm: ["hotspot", "openj9"], jdk: ["8"]],
[version: ["17.0.1.Final", "21.0.0.Final"], vm: ["hotspot"], jdk: ["8", "11", "16", "17"]],
[version: ["17.0.1.Final", "21.0.0.Final"], vm: ["hotspot"], jdk: ["8", "11", "17"]],
// there's no openj9 image for jdk 17
[version: ["17.0.1.Final", "21.0.0.Final"], vm: ["openj9"], jdk: ["8", "11", "16"]]
],
"liberty": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ abstract class AppServerTest extends SmokeTest {
@Override
protected String getTargetImage(String jdk, String serverVersion, boolean windows) {
String platformSuffix = windows ? "-windows" : ""
String extraTag = "20210704.998730666"
String fullSuffix = "-${serverVersion}-jdk$jdk$platformSuffix-$extraTag"
return getTargetImagePrefix() + fullSuffix
String extraTag = "20210929.1285231297"
String fullSuffix = "${serverVersion}-jdk$jdk$platformSuffix-$extraTag"
return getTargetImagePrefix() + ":" + fullSuffix
}

protected abstract String getTargetImagePrefix()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import java.time.Duration
class GlassFishSmokeTest extends AppServerTest {

protected String getTargetImagePrefix() {
"ghcr.io/open-telemetry/java-test-containers:payara"
"ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-servlet-payara"
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ package io.opentelemetry.smoketest
class JettySmokeTest extends AppServerTest {

protected String getTargetImagePrefix() {
"ghcr.io/open-telemetry/java-test-containers:jetty"
"ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-servlet-jetty"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import java.time.Duration
class LibertySmokeTest extends AppServerTest {

protected String getTargetImagePrefix() {
"ghcr.io/open-telemetry/java-test-containers:liberty"
"ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-servlet-liberty"
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,26 @@

package io.opentelemetry.smoketest

@AppServer(version = "7.0.107", jdk = "8")
@AppServer(version = "7.0.107", jdk = "8-openj9")
@AppServer(version = "8.5.60", jdk = "8")
@AppServer(version = "8.5.60", jdk = "8-openj9")
@AppServer(version = "8.5.60", jdk = "11")
@AppServer(version = "8.5.60", jdk = "11-openj9")
@AppServer(version = "9.0.40", jdk = "8")
@AppServer(version = "9.0.40", jdk = "8-openj9")
@AppServer(version = "9.0.40", jdk = "11")
@AppServer(version = "9.0.40", jdk = "11-openj9")
@AppServer(version = "10.0.4", jdk = "11")
@AppServer(version = "10.0.4", jdk = "11-openj9")
@AppServer(version = "10.0.4", jdk = "15")
@AppServer(version = "10.0.4", jdk = "15-openj9")
@AppServer(version = "7.0.109", jdk = "8")
@AppServer(version = "7.0.109", jdk = "8-openj9")
@AppServer(version = "8.5.71", jdk = "8")
@AppServer(version = "8.5.71", jdk = "11")
@AppServer(version = "8.5.71", jdk = "17")
@AppServer(version = "8.5.70", jdk = "8-openj9")
@AppServer(version = "8.5.70", jdk = "11-openj9")
@AppServer(version = "9.0.53", jdk = "8")
@AppServer(version = "9.0.53", jdk = "11")
@AppServer(version = "9.0.53", jdk = "17")
@AppServer(version = "9.0.52", jdk = "8-openj9")
@AppServer(version = "9.0.52", jdk = "11-openj9")
// TODO (trask) there are Tomcat 10 images for Java 8 (both hotspot and openj9)
// but smoke tests are currently failing on them
@AppServer(version = "10.0.11", jdk = "11")
@AppServer(version = "10.0.11", jdk = "17")
@AppServer(version = "10.0.8", jdk = "11-openj9")
class TomcatSmokeTest extends AppServerTest {

protected String getTargetImagePrefix() {
"ghcr.io/open-telemetry/java-test-containers:tomcat"
"ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-servlet-tomcat"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import java.time.Duration
class TomeeSmokeTest extends AppServerTest {

protected String getTargetImagePrefix() {
"ghcr.io/open-telemetry/java-test-containers:tomee"
"ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-servlet-tomee"
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ import spock.lang.Unroll
@AppServer(version = "17.0.1.Final", jdk = "8-openj9")
@AppServer(version = "17.0.1.Final", jdk = "11")
@AppServer(version = "17.0.1.Final", jdk = "11-openj9")
@AppServer(version = "17.0.1.Final", jdk = "16")
@AppServer(version = "17.0.1.Final", jdk = "17")
@AppServer(version = "17.0.1.Final", jdk = "16-openj9")
@AppServer(version = "21.0.0.Final", jdk = "8")
@AppServer(version = "21.0.0.Final", jdk = "8-openj9")
@AppServer(version = "21.0.0.Final", jdk = "11")
@AppServer(version = "21.0.0.Final", jdk = "11-openj9")
@AppServer(version = "21.0.0.Final", jdk = "16")
@AppServer(version = "21.0.0.Final", jdk = "17")
@AppServer(version = "21.0.0.Final", jdk = "16-openj9")
class WildflySmokeTest extends AppServerTest {

protected String getTargetImagePrefix() {
"ghcr.io/open-telemetry/java-test-containers:wildfly"
"ghcr.io/open-telemetry/opentelemetry-java-instrumentation/smoke-test-servlet-wildfly"
}

@Unroll
Expand Down

0 comments on commit 635acd4

Please sign in to comment.