mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Merge branch '2.5.x' into 2.6.x
This commit is contained in:
commit
f6cdc27b2a
@ -23,7 +23,6 @@ import java.util.List;
|
|||||||
import java.util.function.Supplier;
|
import java.util.function.Supplier;
|
||||||
import java.util.stream.Stream;
|
import java.util.stream.Stream;
|
||||||
|
|
||||||
import org.junit.Assume;
|
|
||||||
import org.junit.jupiter.params.ParameterizedTest;
|
import org.junit.jupiter.params.ParameterizedTest;
|
||||||
import org.junit.jupiter.params.provider.MethodSource;
|
import org.junit.jupiter.params.provider.MethodSource;
|
||||||
import org.testcontainers.containers.GenericContainer;
|
import org.testcontainers.containers.GenericContainer;
|
||||||
@ -50,7 +49,6 @@ class LoaderIntegrationTests {
|
|||||||
@ParameterizedTest
|
@ParameterizedTest
|
||||||
@MethodSource("javaRuntimes")
|
@MethodSource("javaRuntimes")
|
||||||
void readUrlsWithoutWarning(JavaRuntime javaRuntime) {
|
void readUrlsWithoutWarning(JavaRuntime javaRuntime) {
|
||||||
javaRuntime.assumeCompatible();
|
|
||||||
try (GenericContainer<?> container = createContainer(javaRuntime)) {
|
try (GenericContainer<?> container = createContainer(javaRuntime)) {
|
||||||
container.start();
|
container.start();
|
||||||
System.out.println(this.output.toUtf8String());
|
System.out.println(this.output.toUtf8String());
|
||||||
@ -79,7 +77,7 @@ class LoaderIntegrationTests {
|
|||||||
javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.ELEVEN));
|
javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.ELEVEN));
|
||||||
javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.SEVENTEEN));
|
javaRuntimes.add(JavaRuntime.openJdk(JavaVersion.SEVENTEEN));
|
||||||
javaRuntimes.add(JavaRuntime.oracleJdk17());
|
javaRuntimes.add(JavaRuntime.oracleJdk17());
|
||||||
return javaRuntimes.stream();
|
return javaRuntimes.stream().filter(JavaRuntime::isCompatible);
|
||||||
}
|
}
|
||||||
|
|
||||||
static final class JavaRuntime {
|
static final class JavaRuntime {
|
||||||
@ -96,8 +94,8 @@ class LoaderIntegrationTests {
|
|||||||
this.container = container;
|
this.container = container;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void assumeCompatible() {
|
private boolean isCompatible() {
|
||||||
Assume.assumeTrue(JavaVersion.getJavaVersion().isEqualOrNewerThan(this.version));
|
return this.version.isEqualOrNewerThan(JavaVersion.getJavaVersion());
|
||||||
}
|
}
|
||||||
|
|
||||||
GenericContainer<?> getContainer() {
|
GenericContainer<?> getContainer() {
|
||||||
|
Loading…
Reference in New Issue
Block a user