Run LoaderIntegrationTests on Java 21

See gh-37359
pull/37394/head
Andy Wilkinson 1 year ago
parent efc180b682
commit c4368bc934

@ -87,6 +87,7 @@ class LoaderIntegrationTests {
javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.SEVENTEEN)); javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.SEVENTEEN));
javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.TWENTY)); javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.TWENTY));
javaRuntimes.add(JavaRuntime.oracleJdk17()); javaRuntimes.add(JavaRuntime.oracleJdk17());
javaRuntimes.add(JavaRuntime.openJdkEarlyAccess(JavaVersion.TWENTY_ONE));
return javaRuntimes.stream().filter(JavaRuntime::isCompatible); return javaRuntimes.stream().filter(JavaRuntime::isCompatible);
} }
@ -117,6 +118,13 @@ class LoaderIntegrationTests {
return this.name; return this.name;
} }
static JavaRuntime openJdkEarlyAccess(JavaVersion version) {
String imageVersion = version.toString();
DockerImageName image = DockerImageName.parse(String.format("openjdk:%s-ea-jdk", imageVersion));
return new JavaRuntime("OpenJDK Early Access " + imageVersion, version,
() -> new GenericContainer<>(image));
}
static JavaRuntime openJdk(JavaVersion version) { static JavaRuntime openJdk(JavaVersion version) {
String imageVersion = (version != JavaVersion.EIGHT) ? version.toString() : "8"; String imageVersion = (version != JavaVersion.EIGHT) ? version.toString() : "8";
DockerImageName image = DockerImageName.parse("bellsoft/liberica-openjdk-debian:" + imageVersion); DockerImageName image = DockerImageName.parse("bellsoft/liberica-openjdk-debian:" + imageVersion);

Loading…
Cancel
Save