Update LoaderIntegrationTests to cover Java 22

See gh-39746
This commit is contained in:
Andy Wilkinson 2024-03-04 11:21:19 +00:00
parent b8a6cab716
commit 0f6b3514db
2 changed files with 12 additions and 4 deletions

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -82,6 +82,7 @@ class LoaderIntegrationTests {
javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.SEVENTEEN));
javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.TWENTY_ONE));
javaRuntimes.add(JavaRuntime.oracleJdk17());
javaRuntimes.add(JavaRuntime.openJdkEarlyAccess(JavaVersion.TWENTY_TWO));
return javaRuntimes.stream().filter(JavaRuntime::isCompatible);
}
@ -112,6 +113,13 @@ class LoaderIntegrationTests {
return this.name;
}
static JavaRuntime openJdkEarlyAccess(JavaVersion version) {
String imageVersion = version.toString();
DockerImageName image = DockerImageName.parse("openjdk:%s-ea-jdk".formatted(imageVersion));
return new JavaRuntime("OpenJDK Early Access " + imageVersion, version,
() -> new GenericContainer<>(image));
}
static JavaRuntime openJdk(JavaVersion version) {
String imageVersion = version.toString();
DockerImageName image = DockerImageName.parse("bellsoft/liberica-openjdk-debian:" + imageVersion);

View File

@ -1,5 +1,5 @@
/*
* Copyright 2012-2023 the original author or authors.
* Copyright 2012-2024 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@ -108,9 +108,9 @@ class LoaderIntegrationTests {
static Stream<JavaRuntime> javaRuntimes() {
List<JavaRuntime> javaRuntimes = new ArrayList<>();
javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.SEVENTEEN));
javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.TWENTY));
javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.TWENTY_ONE));
javaRuntimes.add(JavaRuntime.oracleJdk17());
javaRuntimes.add(JavaRuntime.openJdkEarlyAccess(JavaVersion.TWENTY_ONE));
javaRuntimes.add(JavaRuntime.openJdkEarlyAccess(JavaVersion.TWENTY_TWO));
return javaRuntimes.stream().filter(JavaRuntime::isCompatible);
}