changeset 1157:8cd620e9a658

Fix IOException in WebAppTest reviewed-by: ebaron review-thread: http://icedtea.classpath.org/pipermail/thermostat/2013-July/007245.html
author Jon VanAlten <jon.vanalten@redhat.com>
date Thu, 04 Jul 2013 09:51:54 -0600
parents 2932f90a008f
children 99cfefc38e04
files integration-tests/src/test/java/com/redhat/thermostat/itest/IntegrationTest.java
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/integration-tests/src/test/java/com/redhat/thermostat/itest/IntegrationTest.java	Tue Jul 09 11:03:56 2013 -0400
+++ b/integration-tests/src/test/java/com/redhat/thermostat/itest/IntegrationTest.java	Thu Jul 04 09:51:54 2013 -0600
@@ -163,7 +163,9 @@
         for (String toDelete : filesToDelete) {
             File theFile = new File(path, toDelete);
             if (!theFile.delete()) {
-                throw new IOException("cant delete: '" + theFile.toString() + "'.");
+                if (theFile.exists()) {
+                    throw new IOException("cant delete: '" + theFile.toString() + "'.");
+                }
             }
         }
     }