Do not try to delete the whole output/test-tmp subdirectory when running tests,
authorkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 24 Sep 2011 13:39:44 +0000 (13:39 +0000)
committerkkolinko <kkolinko@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 24 Sep 2011 13:39:44 +0000 (13:39 +0000)
because that wouldn't succeed (at least on Windows).

git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1175167 13f79535-47bb-0310-9956-ffa450edef68

test/org/apache/catalina/startup/TomcatBaseTest.java

index 32d4d48..6f2552e 100644 (file)
@@ -184,7 +184,11 @@ public abstract class TomcatBaseTest {
             }
             tomcat.destroy();
         }
-        ExpandWar.delete(tempDir);
+        // Cannot delete the whole tempDir, because logs are there,
+        // and they might be open for writing. 
+        // Delete known subdirectories of it.
+        ExpandWar.delete(new File(tempDir, "webapps"));
+        ExpandWar.delete(new File(tempDir, "work"));
     }
     
     /**