From: markt Date: Thu, 7 Oct 2010 15:12:21 +0000 (+0000) Subject: Fix some failing tests. No regression in Tomcat/Jasper, just need to take account... X-Git-Url: https://git.internetallee.de/?a=commitdiff_plain;h=e6f713c6e95fd7c63d7d0bc0e8b7e82c5ed1587c;p=tomcat7.0 Fix some failing tests. No regression in Tomcat/Jasper, just need to take account of changes in test framework. git-svn-id: https://svn.apache.org/repos/asf/tomcat/trunk@1005486 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/test/org/apache/jasper/compiler/TestGenerator.java b/test/org/apache/jasper/compiler/TestGenerator.java index 1d80c51ce..187e6784f 100644 --- a/test/org/apache/jasper/compiler/TestGenerator.java +++ b/test/org/apache/jasper/compiler/TestGenerator.java @@ -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 TomcatBaseTest { 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 TomcatBaseTest { 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 TomcatBaseTest { 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 {