commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwaldh...@apache.org
Subject cvs commit: jakarta-commons/httpclient/src/test/org/apache/commons/httpclient TestGetMethodLocal.java TestHttpConnection.java
Date Mon, 16 Dec 2002 19:25:55 GMT
rwaldhoff    2002/12/16 11:25:55

  Modified:    httpclient build.xml
               httpclient/src/test/org/apache/commons/httpclient
                        TestGetMethodLocal.java TestHttpConnection.java
  Log:
  make sure httpclient.test.webappContext property gets passed to relevant suites
  add comment to TestHttpConnection re. intermittent failures
  
  Revision  Changes    Path
  1.23      +2 -1      jakarta-commons/httpclient/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/build.xml,v
  retrieving revision 1.22
  retrieving revision 1.23
  diff -u -r1.22 -r1.23
  --- build.xml	16 Dec 2002 17:07:12 -0000	1.22
  +++ build.xml	16 Dec 2002 19:25:55 -0000	1.23
  @@ -283,6 +283,7 @@
         <java classname="${test.runner}" fork="yes" failonerror="${test.failonerror}">
           <jvmarg value="-Djava.protocol.handler.pkgs=${java.protocol.handler.pkgs}"/>
           <jvmarg value="-Dorg.apache.commons.logging.Log=${httpclient.test.log}"/>
  +        <jvmarg value="-Dhttpclient.test.webappContext=${httpclient.test.webappContext}"
/>
           <arg value="${test.entry}"/>
           <classpath refid="test.classpath"/>
         </java>
  
  
  
  1.6       +17 -7     jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestGetMethodLocal.java
  
  Index: TestGetMethodLocal.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestGetMethodLocal.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TestGetMethodLocal.java	16 Dec 2002 05:16:04 -0000	1.5
  +++ TestGetMethodLocal.java	16 Dec 2002 19:25:55 -0000	1.6
  @@ -63,8 +63,12 @@
   package org.apache.commons.httpclient;
   
   import java.io.IOException;
  -import junit.framework.*;
  -import org.apache.commons.httpclient.methods.*;
  +
  +import junit.framework.Test;
  +import junit.framework.TestCase;
  +import junit.framework.TestSuite;
  +
  +import org.apache.commons.httpclient.methods.GetMethod;
   
   /**
    * Simple tests of {@link GetMethod} hitting
  @@ -105,13 +109,14 @@
       }
   
       public static String getTestContext() {
  -        return System.getProperty("httpclient.test.webappContext");
  +        return System.getProperty(CONTEXT_PROPERTY);
       }
       // -------------------------------------------------------------- Constants
   
       private static final String host = getTestHost();
       private static final String webAppContext = getTestContext();
       private static final int port = getTestPort();
  +    private static final String CONTEXT_PROPERTY = "httpclient.test.webappContext";
   
       // ------------------------------------------------------------ Constructor
   
  @@ -131,6 +136,11 @@
   
       // ------------------------------------------------------------------ Tests
   
  +    public void testWebappContextPropertySet() {
  +        assertNotNull(
  +            "The property \"" + CONTEXT_PROPERTY + "\" should be set",
  +            getTestContext());
  +    }
   
       public void testGetSlashWithoutDisk() {
           HttpClient client = new HttpClient();
  
  
  
  1.4       +2 -0      jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHttpConnection.java
  
  Index: TestHttpConnection.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/httpclient/src/test/org/apache/commons/httpclient/TestHttpConnection.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- TestHttpConnection.java	3 Dec 2002 05:46:16 -0000	1.3
  +++ TestHttpConnection.java	16 Dec 2002 19:25:55 -0000	1.4
  @@ -108,6 +108,8 @@
       public void testConnTimeout() {
           HttpConnection conn = new HttpConnection(host,port);
           // 1 ms is short enough to make this fail
  +        // (not always. we should probably add some sort of delayServlet 
  +        // the test webapp to force this to fail - rlw)
           conn.setConnectionTimeout(1);
           try {
               conn.open();
  
  
  

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message