Skip to content

Commit 38e935e

Browse files
mbensonphilwebb
authored andcommitted
Ignore failures when closing war files in tests
Update WarPackagingTests to ignore any IOExceptions when closing created war files. Exceptions were sometimes thrown when running on a Linux NTFS mount. Fixes gh-3255
1 parent 1e40bff commit 38e935e

File tree

1 file changed

+7
-0
lines changed
  • spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle

1 file changed

+7
-0
lines changed

spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/WarPackagingTests.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,13 @@ private void checkWebInfEntriesForServletContainer(String servletContainer,
9999
checkWebInfLibProvidedEntries(war, expectedLibProvidedEntries);
100100

101101
checkWebInfLibEntries(war, expectedLibProvidedEntries);
102+
103+
try {
104+
war.close();
105+
}
106+
catch (IOException ex) {
107+
// Ignore
108+
}
102109
}
103110

104111
private void checkWebInfLibProvidedEntries(JarFile war, Set<String> expectedEntries)

0 commit comments

Comments
 (0)