FAQ
Author: markt
Date: Wed Oct 29 19:45:02 2014
New Revision: 1635279

URL: http://svn.apache.org/r1635279
Log:
Avoid using /tmp as a docBase where it is not necessary

Modified:
     tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java

Modified: tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java?rev=1635279&r1=1635278&r2=1635279&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java (original)
+++ tomcat/trunk/test/org/apache/catalina/nonblocking/TestNonBlockingAPI.java Wed Oct 29 19:45:02 2014
@@ -44,6 +44,7 @@ import org.junit.Assert;
  import org.junit.Assume;
  import org.junit.Test;

+import org.apache.catalina.Context;
  import org.apache.catalina.core.StandardContext;
  import org.apache.catalina.startup.BytesStreamer;
  import org.apache.catalina.startup.TesterServlet;
@@ -125,9 +126,8 @@ public class TestNonBlockingAPI extends
      @Test
      public void testNonBlockingWrite() throws Exception {
          Tomcat tomcat = getTomcatInstance();
- // Must have a real docBase - just use temp
- StandardContext ctx = (StandardContext) tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);

          NBWriteServlet servlet = new NBWriteServlet();
          String servletName = NBWriteServlet.class.getName();
@@ -271,9 +271,8 @@ public class TestNonBlockingAPI extends
      public void testNonBlockingWriteError() throws Exception {
          Tomcat tomcat = getTomcatInstance();

- // Must have a real docBase - just use temp
- StandardContext ctx = (StandardContext) tomcat.addContext(
- "", System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);

          TesterAccessLogValve alv = new TesterAccessLogValve();
          ctx.getPipeline().addValve(alv);
@@ -358,9 +357,8 @@ public class TestNonBlockingAPI extends
      public void testBug55438NonBlockingReadWriteEmptyRead() throws Exception {
          Tomcat tomcat = getTomcatInstance();

- // Must have a real docBase - just use temp
- StandardContext ctx = (StandardContext) tomcat.addContext("",
- System.getProperty("java.io.tmpdir"));
+ // No file system docBase required
+ Context ctx = tomcat.addContext("", null);

          NBReadWriteServlet servlet = new NBReadWriteServlet();
          String servletName = NBReadWriteServlet.class.getName();



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
groupdev @
categoriestomcat
postedOct 29, '14 at 7:45p
activeOct 29, '14 at 7:45p
posts1
users1
websitetomcat.apache.org
irc#tomcat

1 user in discussion

Markt: 1 post

People

Translate

site design / logo © 2017 Grokbase