mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-07-05 00:56:58 +08:00
Update LoaderIntegrationTests to cover Java 22
See gh-39746
This commit is contained in:
parent
b8a6cab716
commit
0f6b3514db
@ -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);
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user