diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/ApplicationBuilder.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/ApplicationBuilder.java index cb8c483998..198c8ec420 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/ApplicationBuilder.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/ApplicationBuilder.java @@ -98,10 +98,12 @@ class ApplicationBuilder { resourcesJarStream.putNextEntry(new ZipEntry("META-INF/resources/nested-meta-inf-resource.txt")); resourcesJarStream.write("nested".getBytes()); resourcesJarStream.closeEntry(); - resourcesJarStream.putNextEntry( - new ZipEntry("META-INF/resources/nested-reserved-!#$%&()*+,:=?@[]-meta-inf-resource.txt")); - resourcesJarStream.write("encoded-name".getBytes()); - resourcesJarStream.closeEntry(); + if (!isWindows()) { + resourcesJarStream.putNextEntry( + new ZipEntry("META-INF/resources/nested-reserved-!#$%&()*+,:=?@[]-meta-inf-resource.txt")); + resourcesJarStream.write("encoded-name".getBytes()); + resourcesJarStream.closeEntry(); + } return resourcesJar; } } @@ -162,4 +164,8 @@ class ApplicationBuilder { assertThat(execute.getExitCode()).isEqualTo(0); } + private boolean isWindows() { + return File.separatorChar == '\\'; + } + } diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarDevelopmentIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarDevelopmentIntegrationTests.java index 3e08be3e0c..d6a7540f4c 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarDevelopmentIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarDevelopmentIntegrationTests.java @@ -17,6 +17,8 @@ package org.springframework.boot.context.embedded; import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -41,6 +43,7 @@ public class EmbeddedServletContainerJarDevelopmentIntegrationTests { } @TestTemplate + @DisabledOnOs(OS.WINDOWS) public void metaInfResourceFromDependencyWithNameThatContainsReservedCharactersIsAvailableViaHttp( RestTemplate rest) { ResponseEntity entity = rest.getForEntity( diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarPackagingIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarPackagingIntegrationTests.java index 740bd2dd2c..d39ad4681a 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarPackagingIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerJarPackagingIntegrationTests.java @@ -17,6 +17,8 @@ package org.springframework.boot.context.embedded; import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -41,6 +43,7 @@ public class EmbeddedServletContainerJarPackagingIntegrationTests { } @TestTemplate + @DisabledOnOs(OS.WINDOWS) public void nestedMetaInfResourceWithNameThatContainsReservedCharactersIsAvailableViaHttp(RestTemplate rest) { ResponseEntity entity = rest.getForEntity( "/nested-reserved-%21%23%24%25%26%28%29%2A%2B%2C%3A%3D%3F%40%5B%5D-meta-inf-resource.txt", diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarDevelopmentIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarDevelopmentIntegrationTests.java index 14129dfcb4..1ded7aeeef 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarDevelopmentIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarDevelopmentIntegrationTests.java @@ -24,6 +24,8 @@ import java.util.List; import java.util.stream.Collectors; import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -48,6 +50,7 @@ public class EmbeddedServletContainerWarDevelopmentIntegrationTests { } @TestTemplate + @DisabledOnOs(OS.WINDOWS) public void metaInfResourceFromDependencyWithNameThatContainsReservedCharactersIsAvailableViaHttp( RestTemplate rest) { ResponseEntity entity = rest.getForEntity( diff --git a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarPackagingIntegrationTests.java b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarPackagingIntegrationTests.java index bd7cc699f5..4f557e0a83 100644 --- a/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarPackagingIntegrationTests.java +++ b/spring-boot-tests/spring-boot-integration-tests/spring-boot-server-tests/src/test/java/org/springframework/boot/context/embedded/EmbeddedServletContainerWarPackagingIntegrationTests.java @@ -24,6 +24,8 @@ import java.util.List; import java.util.stream.Collectors; import org.junit.jupiter.api.TestTemplate; +import org.junit.jupiter.api.condition.DisabledOnOs; +import org.junit.jupiter.api.condition.OS; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -48,6 +50,7 @@ public class EmbeddedServletContainerWarPackagingIntegrationTests { } @TestTemplate + @DisabledOnOs(OS.WINDOWS) public void nestedMetaInfResourceWithNameThatContainsReservedCharactersIsAvailableViaHttp(RestTemplate rest) { ResponseEntity entity = rest.getForEntity( "/nested-reserved-%21%23%24%25%26%28%29%2A%2B%2C%3A%3D%3F%40%5B%5D-meta-inf-resource.txt",