Stop the tests failing
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 8 May 2010 16:01:16 +0000 (16:01 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Sat, 8 May 2010 16:01:16 +0000 (16:01 +0000)
git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@942409 13f79535-47bb-0310-9956-ffa450edef68

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

index c274176..08e5f38 100644 (file)
@@ -84,12 +84,12 @@ public abstract class TomcatBaseTest extends TestCase {
                 "org.apache.juli.ClassLoaderLogManager");
 
         tempDir = new File(System.getProperty("tomcat.test.temp", "output/tmp"));
-        if (!tempDir.mkdir()) {
+        if (!tempDir.exists() && !tempDir.mkdir()) {
             fail("Unable to create temporary directory for test");
         }
         
         File appBase = new File(tempDir, "webapps");
-        if (!appBase.mkdir()) {
+        if (!appBase.exists() && !appBase.mkdir()) {
             fail("Unable to create appBase for test");
         }