Author: markt
Date: Wed Oct 29 19:58:19 2014
New Revision: 1635284
URL: http://svn.apache.org/r1635284
Log:
Avoid using /tmp as a docBase where it is not necessary
Modified:
tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
Modified: tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
URL:
http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java?rev=1635284&r1=1635283&r2=1635284&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java
(original)
+++ tomcat/trunk/test/org/apache/catalina/valves/TestErrorReportValve.java Wed
Oct 29 19:58:19 2014
@@ -16,7 +16,6 @@
*/
package org.apache.catalina.valves;
-import java.io.File;
import java.io.IOException;
import javax.servlet.AsyncContext;
@@ -41,9 +40,8 @@ public class TestErrorReportValve extend
public void testBug53071() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "errorServlet", new ErrorServlet());
ctx.addServletMapping("/", "errorServlet");
@@ -75,9 +73,8 @@ public class TestErrorReportValve extend
public void testBug54220DoNotSetNotFound() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "bug54220", new Bug54220Servlet(false));
ctx.addServletMapping("/", "bug54220");
@@ -96,9 +93,8 @@ public class TestErrorReportValve extend
public void testBug54220SetNotFound() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "bug54220", new Bug54220Servlet(true));
ctx.addServletMapping("/", "bug54220");
@@ -141,9 +137,8 @@ public class TestErrorReportValve extend
public void testBug54536() throws Exception {
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- Context ctx =
- tomcat.addContext("", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Tomcat.addServlet(ctx, "bug54536", new Bug54536Servlet());
ctx.addServletMapping("/", "bug54536");
@@ -178,10 +173,8 @@ public class TestErrorReportValve extend
// Setup Tomcat instance
Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- File docBase = new File(System.getProperty("java.io.tmpdir"));
-
- Context ctx = tomcat.addContext("", docBase.getAbsolutePath());
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);
Bug56042Servlet bug56042Servlet = new Bug56042Servlet();
Wrapper wrapper =
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]