jakarta-watchdog-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craig...@locus.apache.org
Subject cvs commit: jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse SetBufferSize_1TestServlet.java
Date Tue, 05 Dec 2000 02:56:17 GMT
craigmcc    00/12/04 18:56:17

  Modified:    src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse
                        SetBufferSize_1TestServlet.java
  Log:
  Modify test to correctly report the success case (after resetting the buffer
  to get rid of the test output), and to be more descriptive in the failure
  cases.
  
  Revision  Changes    Path
  1.3       +9 -6      jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetBufferSize_1TestServlet.java
  
  Index: SetBufferSize_1TestServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetBufferSize_1TestServlet.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- SetBufferSize_1TestServlet.java	2000/11/06 21:32:23	1.2
  +++ SetBufferSize_1TestServlet.java	2000/12/05 02:56:16	1.3
  @@ -1,7 +1,7 @@
   /*
  - * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetBufferSize_1TestServlet.java,v
1.2 2000/11/06 21:32:23 santosh Exp $ 
  - * $Date: 2000/11/06 21:32:23 $ 
  - * $Revision: 1.2 $
  + * $Header: /home/cvs/jakarta-watchdog-4.0/src/server/servlet-tests/WEB-INF/classes/tests/javax_servlet/ServletResponse/SetBufferSize_1TestServlet.java,v
1.3 2000/12/05 02:56:16 craigmcc Exp $ 
  + * $Date: 2000/12/05 02:56:16 $ 
  + * $Revision: 1.3 $
    * 
    * The Apache Software License, Version 1.1
    *
  @@ -78,19 +78,22 @@
   	public void service (ServletRequest request, ServletResponse response) throws ServletException,
IOException {
   
   		PrintWriter out = response.getWriter();
  -		ServletOutputStream sos = null;
   		try {
  -			sos = response.getOutputStream();
  -			sos.println("Good Luck");
  +			out.println("Good Luck");
   			try {
   				//should IllegalStateException
   				response.setBufferSize(20);
  +		                response.resetBuffer();
   				out.println("SetBufferSize_1Test test FAILED");
  +				out.println("Did not throw IllegalStateException");
   			}catch(IllegalStateException ise) {
  +			        response.resetBuffer();
   				out.println("SetBufferSize_1Test test PASSED");
   			                                  }
   		}catch(Exception e) {
  +		                response.resetBuffer();
   				out.println("SetBufferSize_1Test test FAILED");
  +				out.println("Threw exception " + e);
   				 }
   		
   	}	
  
  
  

Mime
View raw message