You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cactus-dev@jakarta.apache.org by vm...@apache.org on 2002/02/07 23:59:56 UTC
cvs commit: jakarta-cactus/src/sample/share/org/apache/cactus/sample TestSampleServlet.java
vmassol 02/02/07 14:59:56
Modified: conf/sample/conf/test/servlet22/tomcat33 server.xml
src/sample/share/org/apache/cactus/sample
TestSampleServlet.java
Log:
Corrected testPostMethod() test case so that it reads the request body. Why ? 2 reasons :
- the test is more meaningfull if we compare the POST data with the expected value (in other words, the test wasn't that good before this change)
- on fast machines and with Tomcat 3.3, it can happen that the request is processed faster than the network ! i.e. Tomcat closes the connection before HttpURLConnection has finished sending POST data ... thus causing a "connection aborted by peer" ...
Thanks to Larry Isaacs, Costin Manolache and Bill Parker for finding the cause of the problem.
Revision Changes Path
1.7 +13 -15 jakarta-cactus/conf/sample/conf/test/servlet22/tomcat33/server.xml
Index: server.xml
===================================================================
RCS file: /home/cvs/jakarta-cactus/conf/sample/conf/test/servlet22/tomcat33/server.xml,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- server.xml 16 Jan 2002 23:42:54 -0000 1.6
+++ server.xml 7 Feb 2002 22:59:56 -0000 1.7
@@ -6,31 +6,31 @@
<!-- ==================== Global modules ==================== -->
<LogEvents enabled="false" />
-
+
<AutoDeploy source="webapps" target="webapps" />
<AutoWebApp dir="webapps" host="DEFAULT" />
<SimpleMapper1 />
<SessionExpirer checkInterval="60" />
- <SessionIdGenerator randomClass="java.util.Random"
+ <SessionIdGenerator randomClass="java.util.Random"
randomFile="/dev/urandom" />
<!-- ========== context processing modules ========== -->
- <!-- This will be the "default" profile
+ <!-- This will be the "default" profile
( all except the "global" modules can be set per context )
-->
- <LogSetter name="servlet_log"
+ <LogSetter name="servlet_log"
timestamps="true"
verbosityLevel = "INFORMATION"
- path="servlet-${yyyyMMdd}.log"
+ path="servlet-${yyyyMMdd}.log"
/>
<LogSetter name="JASPER_LOG"
- timestamps="true"
- path="jasper-${yyyyMMdd}.log"
+ timestamps="true"
+ path="jasper-${yyyyMMdd}.log"
verbosityLevel = "INFORMATION" />
<LoaderInterceptor11 useApplicationLoader="true" />
@@ -41,10 +41,10 @@
<WorkDirSetup cleanWorkDir="false" />
- <Jdk12Interceptor />
+ <Jdk12Interceptor />
<!-- Non-standard invoker, for backward compat. ( /servlet/* ) -->
- <InvokerInterceptor />
+ <InvokerInterceptor />
<!-- you can add javaCompiler="jikes" -->
<JspInterceptor keepGenerated="true"
@@ -52,9 +52,9 @@
sendErrToClient="true"
useJspServlet="false"
/>
-
+
<StaticInterceptor debug="0" listings="true" />
-
+
<ReloadInterceptor fullReload="true" />
<SimpleSessionStore maxActiveSessions="-1" />
@@ -71,9 +71,9 @@
<!-- Request processing -->
- <DecodeInterceptor debug="0" />
+ <DecodeInterceptor debug="0" />
- <SessionId cookiesFirst="true" noCookies="false" />
+ <SessionId cookiesFirst="true" noCookies="false" />
<!-- ==================== Connectors ==================== -->
@@ -81,8 +81,6 @@
secure - use SSL ( https )
keystore, keypass - certs for SSL
port -->
-
- <!-- Http10Connector port="@test.port@" delaySocketClose="true" -->
<Http10Connector port="@test.port@"
secure="false"
1.16 +2 -1 jakarta-cactus/src/sample/share/org/apache/cactus/sample/TestSampleServlet.java
Index: TestSampleServlet.java
===================================================================
RCS file: /home/cvs/jakarta-cactus/src/sample/share/org/apache/cactus/sample/TestSampleServlet.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- TestSampleServlet.java 2 Feb 2002 17:54:37 -0000 1.15
+++ TestSampleServlet.java 7 Feb 2002 22:59:56 -0000 1.16
@@ -70,7 +70,7 @@
*
* @author <a href="mailto:vmassol@apache.org">Vincent Massol</a>
*
- * @version $Id: TestSampleServlet.java,v 1.15 2002/02/02 17:54:37 vmassol Exp $
+ * @version $Id: TestSampleServlet.java,v 1.16 2002/02/07 22:59:56 vmassol Exp $
*/
public class TestSampleServlet extends ServletTestCase
{
@@ -152,6 +152,7 @@
{
SampleServlet servlet = new SampleServlet();
assertEquals("POST", servlet.checkMethod(request));
+ assertEquals("value", request.getParameter("param"));
}
//-------------------------------------------------------------------------
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>