cvs commit: jakarta-tomcat-4.1/tester/src/tester/org/apache/tester SetBufferSize01.java
craigmcc01/01/13 14:31:34 Modified:tester/src/tester/org/apache/tester SetBufferSize01.java Log: Port forward the revised setBufferSize() test. Revision ChangesPath 1.3 +5 -1 jakarta-tomcat-4.1/tester/src/tester/org/apache/tester/SetBufferSize01.java Index: SetBufferSize01.java === RCS file: /home/cvs/jakarta-tomcat-4.1/tester/src/tester/org/apache/tester/SetBufferSize01.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- SetBufferSize01.java 2001/01/13 00:52:01 1.2 +++ SetBufferSize01.java 2001/01/13 22:31:33 1.3 @@ -68,7 +68,7 @@ * Negative test for ServletResponse.setBufferSize(). * * @author Craig R. McClanahan - * @version $Revision: 1.2 $ $Date: 2001/01/13 00:52:01 $ + * @version $Revision: 1.3 $ $Date: 2001/01/13 22:31:33 $ */ public class SetBufferSize01 extends GenericServlet { @@ -93,10 +93,14 @@ PrintWriter writer = response.getWriter(); try { writer.print("SetBufferSize01 "); +response.flushBuffer(); response.setBufferSize(100); writer.println("FAILED - Did not throw IllegalStateException"); } catch (IllegalStateException e) { writer.println("PASSED"); +} catch (IOException e) { +writer.println("FAILED - flushBuffer() threw IOException"); +throw e; } while (true) { String message = StaticLogger.read(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]
cvs commit: jakarta-tomcat-4.1/tester/src/tester/org/apache/tester SetBufferSize01.java
craigmcc01/01/12 16:52:01 Modified:tester/src/tester/org/apache/tester SetBufferSize01.java Log: Forward port the test imrpovement. Revision ChangesPath 1.2 +4 -6 jakarta-tomcat-4.1/tester/src/tester/org/apache/tester/SetBufferSize01.java Index: SetBufferSize01.java === RCS file: /home/cvs/jakarta-tomcat-4.1/tester/src/tester/org/apache/tester/SetBufferSize01.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- SetBufferSize01.java 2000/12/22 22:13:07 1.1 +++ SetBufferSize01.java 2001/01/13 00:52:01 1.2 @@ -68,7 +68,7 @@ * Negative test for ServletResponse.setBufferSize(). * * @author Craig R. McClanahan - * @version $Revision: 1.1 $ $Date: 2000/12/22 22:13:07 $ + * @version $Revision: 1.2 $ $Date: 2001/01/13 00:52:01 $ */ public class SetBufferSize01 extends GenericServlet { @@ -92,13 +92,11 @@ response.setContentType("text/plain"); PrintWriter writer = response.getWriter(); try { -writer.println("TEST"); +writer.print("SetBufferSize01 "); response.setBufferSize(100); -response.reset(); -writer.println("SetBufferSize01 FAILED - Did not throw IllegalStateException"); +writer.println("FAILED - Did not throw IllegalStateException"); } catch (IllegalStateException e) { -response.reset(); -writer.println("SetBufferSize01 PASSED"); +writer.println("PASSED"); } while (true) { String message = StaticLogger.read(); - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]