From f386ebe61df37f8b1c3077f273905421bec0de5b Mon Sep 17 00:00:00 2001 From: Scott Frederick Date: Fri, 20 Aug 2021 14:09:23 -0500 Subject: [PATCH] Remove tests that rely on an unpredictable order of repackaged libs See gh-27436 --- .../boot/maven/JarIntegrationTests.java | 13 ------------- .../boot/maven/WarIntegrationTests.java | 12 ------------ 2 files changed, 25 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/JarIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/JarIntegrationTests.java index a6e4b3157d..bd33959159 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/JarIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/JarIntegrationTests.java @@ -396,19 +396,6 @@ class JarIntegrationTests extends AbstractArchiveIntegrationTests { return jarHash.get(); } - @TestTemplate - void whenJarIsRepackagedWithDefaultsThenLibrariesAreNotSorted(MavenBuild mavenBuild) throws InterruptedException { - mavenBuild.project("jar").execute((project) -> { - File repackaged = new File(project, "target/jar-0.0.1.BUILD-SNAPSHOT.jar"); - List unsortedLibs = Arrays.asList("BOOT-INF/lib/spring-context", "BOOT-INF/lib/spring-aop", - "BOOT-INF/lib/spring-beans", "BOOT-INF/lib/spring-core", "BOOT-INF/lib/spring-jcl", - "BOOT-INF/lib/spring-expression", "BOOT-INF/lib/jakarta.servlet-api", - "BOOT-INF/lib/spring-boot-jarmode-layertools"); - assertThat(jar(repackaged)).entryNamesInPath("BOOT-INF/lib/").zipSatisfy(unsortedLibs, - (String jarLib, String expectedLib) -> assertThat(jarLib).startsWith(expectedLib)); - }); - } - @TestTemplate void whenJarIsRepackagedWithOutputTimestampConfiguredThenLibrariesAreSorted(MavenBuild mavenBuild) throws InterruptedException { diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/WarIntegrationTests.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/WarIntegrationTests.java index e32b6f58d0..979baa0682 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/WarIntegrationTests.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/intTest/java/org/springframework/boot/maven/WarIntegrationTests.java @@ -112,18 +112,6 @@ class WarIntegrationTests extends AbstractArchiveIntegrationTests { return warHash.get(); } - @TestTemplate - void whenWarIsRepackagedWithDefaultsThenLibrariesAreNotSorted(MavenBuild mavenBuild) throws InterruptedException { - mavenBuild.project("war").execute((project) -> { - File repackaged = new File(project, "target/war-0.0.1.BUILD-SNAPSHOT.war"); - List unsortedLibs = Arrays.asList("WEB-INF/lib/spring-aop", "WEB-INF/lib/spring-beans", - "WEB-INF/lib/spring-expression", "WEB-INF/lib/spring-context", "WEB-INF/lib/spring-core", - "WEB-INF/lib/spring-jcl", "WEB-INF/lib/spring-boot-jarmode-layertools"); - assertThat(jar(repackaged)).entryNamesInPath("WEB-INF/lib/").zipSatisfy(unsortedLibs, - (String jarLib, String expectedLib) -> assertThat(jarLib).startsWith(expectedLib)); - }); - } - @TestTemplate void whenWarIsRepackagedWithOutputTimestampConfiguredThenLibrariesAreSorted(MavenBuild mavenBuild) throws InterruptedException {