Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=47568
authormarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 30 Jul 2009 07:01:13 +0000 (07:01 +0000)
committermarkt <markt@13f79535-47bb-0310-9956-ffa450edef68>
Thu, 30 Jul 2009 07:01:13 +0000 (07:01 +0000)
Create the tmp dir where intended
Remove it when we are done

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

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

index 667fa21..9fba977 100644 (file)
@@ -54,12 +54,12 @@ public class TestTomcat extends TestCase {
 
     public void setUp() throws Exception {
         t0 = System.currentTimeMillis();
-        tempDir = new File("output/tmp");
+        tempDir = new File(base + "output/tmp");
         tempDir.mkdir();
         
         tomcat = new Tomcat();
-        tomcat.getHost().setAppBase(tempDir.getAbsolutePath());
         tomcat.setBaseDir(tempDir.getAbsolutePath());
+        tomcat.getHost().setAppBase(tempDir.getAbsolutePath() + "/webapps");
           
         // If each test is running on same port - they
         // may interfere with each other (on unix at least)
@@ -71,6 +71,7 @@ public class TestTomcat extends TestCase {
         tomcat.stop();
         System.err.println("Test time: " + 
                 (System.currentTimeMillis() - t0));
+        ExpandWar.delete(tempDir);
     }
     
     /**