jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rlu...@apache.org
Subject cvs commit: jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task GTest.java
Date Tue, 22 Jan 2002 13:39:15 GMT
rlubke      02/01/22 05:39:15

  Modified:    src/tools/org/apache/tomcat/task GTest.java
  Log:
   - reverted changes that caused Socket issues when reading.
   - Cleaned up reported of test success and failures.
  
  Revision  Changes    Path
  1.15      +13 -18    jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java
  
  Index: GTest.java
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/tools/org/apache/tomcat/task/GTest.java,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- GTest.java	22 Jan 2002 01:39:39 -0000	1.14
  +++ GTest.java	22 Jan 2002 13:39:15 -0000	1.15
  @@ -429,25 +429,25 @@
               boolean result = checkResponse( magnitude );
   
               if ( result ) {
  -		passCount++;
  +		        passCount++;
                   if ( resultOut != null ) {
                       resultOut.write( "<result>PASS</result>\n".getBytes() );
                   }
  -
  -                if ( "No description".equals( description ) ) {
  -                    System.out.println( " OK " + request );
  -                } else
  -                    System.out.println( " OK " + description + " (" + request + ")" );
  +                if ( testName != null ) {
  +                    System.out.println( " PASSED " + testName + " (" + request + ")" );
  +                } else {
  +                    System.out.println( " PASSED " + request );
  +                }
               } else {
  -		failureCount++;
  +		        failureCount++;
                   if ( resultOut != null ) {
                       resultOut.write( "<result>FAIL</result>\n".getBytes() );
                   }
  -
  -                if ( "No description".equals( description ) ) {
  -                    System.out.println( " FAIL " + request );
  -                } else
  -                    System.out.println( " FAIL " + description + " (" + request + ")" );
  +                if ( testName != null ) {
  +                    System.out.println( " FAILED " + testName + " (" + request + ")" );
  +                } else {
  +                    System.out.println( " FAILED " + request );
  +                }
               }
   
               if ( resultOut != null ) {
  @@ -872,16 +872,13 @@
               byte[] reqbytes = reqbuf.toString().getBytes();
               out.write( reqbytes, 0, reqbytes.length );
               out.flush();
  +            reqbuf = null;
           } catch ( Exception ex1 ) {
               System.out.println( " Error writing request " + ex1 );
   	        if ( debug > 0 ) {
   		        System.out.println( "Message: " + ex1.getMessage() );
   		        ex1.printStackTrace();
   	        }
  -        } finally {
  -            out.close();
  -            out = null;
  -            reqbuf = null;
           }
   
           try {
  @@ -910,9 +907,7 @@
   	        if ( debug > 0 ) {
   		        System.out.println( " closing socket" );
   	        }
  -            in.close();
   	        socket.close();
  -            in = null;
   	        socket = null;
   	    }
       }
  
  
  

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


Mime
View raw message