From 38e935ee5ebdd8662ca2b9ae8addc5f4faf058c4 Mon Sep 17 00:00:00 2001 From: Matt Benson Date: Tue, 16 Jun 2015 18:00:59 -0500 Subject: [PATCH] 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 --- .../org/springframework/boot/gradle/WarPackagingTests.java | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/WarPackagingTests.java b/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/WarPackagingTests.java index c135e2741e3..b98b5d95c73 100644 --- a/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/WarPackagingTests.java +++ b/spring-boot-integration-tests/spring-boot-gradle-tests/src/test/java/org/springframework/boot/gradle/WarPackagingTests.java @@ -99,6 +99,13 @@ public class WarPackagingTests { checkWebInfLibProvidedEntries(war, expectedLibProvidedEntries); checkWebInfLibEntries(war, expectedLibProvidedEntries); + + try { + war.close(); + } + catch (IOException ex) { + // Ignore + } } private void checkWebInfLibProvidedEntries(JarFile war, Set expectedEntries)