tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1005493 - in /tomcat/trunk/test/org/apache/jasper/compiler: TestJspDocumentParser.java TestValidator.java
Date Thu, 07 Oct 2010 15:33:47 GMT
Author: markt
Date: Thu Oct  7 15:33:46 2010
New Revision: 1005493

URL: http://svn.apache.org/viewvc?rev=1005493&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/TestJspDocumentParser.java
    tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java

Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java?rev=1005493&r1=1005492&r2=1005493&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestJspDocumentParser.java Thu Oct  7 15:33:46
2010
@@ -20,8 +20,11 @@ package org.apache.jasper.compiler;
 import java.io.File;
 import java.io.IOException;
 
+import javax.servlet.http.HttpServletResponse;
+
 import org.apache.catalina.startup.Tomcat;
 import org.apache.catalina.startup.TomcatBaseTest;
+import org.apache.tomcat.util.buf.ByteChunk;
 
 public class TestJspDocumentParser extends TomcatBaseTest {
     
@@ -35,15 +38,10 @@ public class TestJspDocumentParser exten
         
         tomcat.start();
 
-        Exception e = null;
-        try {
-            getUrl("http://localhost:" + getPort() + "/test/bug47977.jspx");
-        } catch (IOException ioe) {
-            e = ioe;
-        }
-
-        // Failure is expected
-        assertNotNull(e);
+        int rc = getUrl("http://localhost:" + getPort() +
+                "/test/bug47977.jspx", new ByteChunk(), null);
+        
+        assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
     }
     
     public void testBug48827() throws Exception {

Modified: tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java?rev=1005493&r1=1005492&r2=1005493&view=diff
==============================================================================
--- tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java (original)
+++ tomcat/trunk/test/org/apache/jasper/compiler/TestValidator.java Thu Oct  7 15:33:46 2010
@@ -20,6 +20,7 @@ package org.apache.jasper.compiler;
 import java.io.File;
 import java.io.IOException;
 
+import javax.servlet.http.HttpServletResponse;
 import javax.servlet.jsp.JspException;
 import javax.servlet.jsp.tagext.TagSupport;
 
@@ -39,15 +40,10 @@ public class TestValidator extends Tomca
         
         tomcat.start();
 
-        Exception e = null;
-        try {
-            getUrl("http://localhost:" + getPort() + "/test/bug47331.jsp");
-        } catch (IOException ioe) {
-            e = ioe;
-        }
-
-        // Failure is expected
-        assertNotNull(e);
+        int rc = getUrl("http://localhost:" + getPort() +
+                "/test/bug47331.jsp", new ByteChunk(), null);
+        
+        assertEquals(HttpServletResponse.SC_INTERNAL_SERVER_ERROR, rc);
     }
     
 



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


Mime
View raw message