tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1005486 - /tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java
Date Thu, 07 Oct 2010 15:12:21 GMT
Author: markt
Date: Thu Oct  7 15:12:21 2010
New Revision: 1005486

URL: http://svn.apache.org/viewvc?rev=1005486&view=rev
Log:
Fix some failing tests. No regression in Tomcat/Jasper, just need to take account of changes
in test framework.

Modified:
    tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java

Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java?rev=1005486&r1=1005485&r2=1005486&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestGenerator.java Thu Oct  7 15:12:21 2010
@@ -24,6 +24,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagData;
 import javax.servlet.jsp.tagext.TagExtraInfo;
@@ -75,15 +77,10 @@ public class TestGenerator extends Tomca
         
         tomcat.start();
 
-        Exception e = null;
-        try {
-            getUrl("http://localhost:" + getPort() + "/test/bug45nnn/bug45015b.jsp");
-        } catch (IOException ioe) {
-            e = ioe;
-        }
-
-        // Failure is expected
-        assertNotNull(e);
+        int rc = getUrl("http://localhost:" + getPort() +
+                "/test/bug45nnn/bug45015b.jsp", new ByteChunk(), null);
+        
+        assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
     }
 
     public void testBug45015c() throws Exception {
@@ -96,15 +93,10 @@ public class TestGenerator extends Tomca
         
         tomcat.start();
 
-        Exception e = null;
-        try {
-            getUrl("http://localhost:" + getPort() + "/test/bug45nnn/bug45015c.jsp");
-        } catch (IOException ioe) {
-            e = ioe;
-        }
-
-        // Failure is expected
-        assertNotNull(e);
+        int rc = getUrl("http://localhost:" + getPort() +
+                "/test/bug45nnn/bug45015c.jsp", new ByteChunk(), null);
+        
+        assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
     }
 
     public void testBug48701Fail() throws Exception {
@@ -122,15 +114,10 @@ public class TestGenerator extends Tomca
         
         tomcat.start();
 
-        Exception e = null;
-        try {
-            getUrl("http://localhost:" + getPort() + "/test/bug48nnn/bug48701-fail.jsp");
-        } catch (IOException ioe) {
-            e = ioe;
-        }
-
-        // Failure is expected
-        assertNotNull(e);
+        int rc = getUrl("http://localhost:" + getPort() +
+                "/test/bug48nnn/bug48701-fail.jsp", new ByteChunk(), null);
+        
+        assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
     }
 
     public void testBug48701UseBean() throws Exception {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message