tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r1226385 - /tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java
Date Mon, 02 Jan 2012 12:37:51 GMT
FYI, I am able to reproduce the failures in this test.
Using JDK 6u29 32-bit on WinXP.
The exceptions are strange. See below.

TEST-org.apache.catalina.startup.TestWebRuleSet.BIO.txt
@ r1226397
[[[
Testsuite: org.apache.catalina.startup.TestWebRuleSet
Tests run: 7, Failures: 4, Errors: 0, Time elapsed: 0,781 sec
------------- Standard Error -----------------
java.net.MalformedURLException
	at java.net.URL.<init>(URL.java:601)
	at java.net.URL.<init>(URL.java:464)
	at java.net.URL.<init>(URL.java:413)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1556)
	at org.apache.catalina.startup.TestWebRuleSet.parse(TestWebRuleSet.java:136)
	at org.apache.catalina.startup.TestWebRuleSet.testSingleNameInWebFragmentXml(TestWebRuleSet.java:49)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
java.net.MalformedURLException
	at java.net.URL.<init>(URL.java:601)
	at java.net.URL.<init>(URL.java:464)
	at java.net.URL.<init>(URL.java:413)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1556)
	at org.apache.catalina.startup.TestWebRuleSet.parse(TestWebRuleSet.java:136)
	at org.apache.catalina.startup.TestWebRuleSet.testSingleOrderingInWebFragmentXml(TestWebRuleSet.java:65)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
java.net.MalformedURLException
	at java.net.URL.<init>(URL.java:601)
	at java.net.URL.<init>(URL.java:464)
	at java.net.URL.<init>(URL.java:413)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1556)
	at org.apache.catalina.startup.TestWebRuleSet.parse(TestWebRuleSet.java:136)
	at org.apache.catalina.startup.TestWebRuleSet.testSingleOrderingInWebXml(TestWebRuleSet.java:82)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
java.net.MalformedURLException
	at java.net.URL.<init>(URL.java:601)
	at java.net.URL.<init>(URL.java:464)
	at java.net.URL.<init>(URL.java:413)
	at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(XMLEntityManager.java:650)
	at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(XMLVersionDetector.java:186)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:772)
	at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(XML11Configuration.java:737)
	at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(XMLParser.java:119)
	at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1205)
	at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(SAXParserImpl.java:522)
	at org.apache.tomcat.util.digester.Digester.parse(Digester.java:1556)
	at org.apache.catalina.startup.TestWebRuleSet.parse(TestWebRuleSet.java:136)
	at org.apache.catalina.startup.TestWebRuleSet.testRecycle(TestWebRuleSet.java:98)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
	at java.lang.reflect.Method.invoke(Method.java:597)
	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:44)
	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:15)
	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:41)
	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:20)
	at org.junit.runners.BlockJUnit4ClassRunner.runNotIgnored(BlockJUnit4ClassRunner.java:79)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:71)
	at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:49)
	at org.junit.runners.ParentRunner$3.run(ParentRunner.java:193)
	at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:52)
	at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:191)
	at org.junit.runners.ParentRunner.access$000(ParentRunner.java:42)
	at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:184)
	at org.junit.runners.ParentRunner.run(ParentRunner.java:236)
	at junit.framework.JUnit4TestAdapter.run(JUnit4TestAdapter.java:39)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:518)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:1052)
	at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:906)
------------- ---------------- ---------------

Testcase: testSingleNameInWebFragmentXml took 0,25 sec
	FAILED

junit.framework.AssertionFailedError:
	at org.apache.catalina.startup.TestWebRuleSet.parse(TestWebRuleSet.java:146)
	at org.apache.catalina.startup.TestWebRuleSet.testSingleNameInWebFragmentXml(TestWebRuleSet.java:49)

Testcase: testMultipleNameInWebFragmentXml took 0,016 sec
Testcase: testSingleOrderingInWebFragmentXml took 0,094 sec
	FAILED

junit.framework.AssertionFailedError:
	at org.apache.catalina.startup.TestWebRuleSet.parse(TestWebRuleSet.java:146)
	at org.apache.catalina.startup.TestWebRuleSet.testSingleOrderingInWebFragmentXml(TestWebRuleSet.java:65)

Testcase: testMultipleOrderingInWebFragmentXml took 0 sec
Testcase: testSingleOrderingInWebXml took 0,297 sec
	FAILED

junit.framework.AssertionFailedError:
	at org.apache.catalina.startup.TestWebRuleSet.parse(TestWebRuleSet.java:146)
	at org.apache.catalina.startup.TestWebRuleSet.testSingleOrderingInWebXml(TestWebRuleSet.java:82)

Testcase: testMultipleOrderingInWebXml took 0,015 sec
Testcase: testRecycle took 0,094 sec
	FAILED

junit.framework.AssertionFailedError:
	at org.apache.catalina.startup.TestWebRuleSet.parse(TestWebRuleSet.java:146)
	at org.apache.catalina.startup.TestWebRuleSet.testRecycle(TestWebRuleSet.java:98)
]]]


2012/1/2  <markt@apache.org>:
> Author: markt
> Date: Mon Jan  2 10:31:06 2012
> New Revision: 1226385
>
> URL: http://svn.apache.org/viewvc?rev=1226385&view=rev
> Log:
> Add some debug that might explain why Gump runs are failing
>
> Modified:
>    tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java
>
> Modified: tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java
> URL: http://svn.apache.org/viewvc/tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java?rev=1226385&r1=1226384&r2=1226385&view=diff
> ==============================================================================
> --- tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java (original)
> +++ tomcat/trunk/test/org/apache/catalina/startup/TestWebRuleSet.java Mon Jan  2 10:31:06
2012
> @@ -46,14 +46,14 @@ public class TestWebRuleSet {
>
>         WebXml webXml = new WebXml();
>
> -        assertTrue(parse(webXml, "web-fragment-1name.xml", true));
> +        parse(webXml, "web-fragment-1name.xml", true, true);
>         assertEquals("name1", webXml.getName());
>     }
>
>
>     @Test
>     public void testMultipleNameInWebFragmentXml() throws Exception {
> -        assertFalse(parse(new WebXml(), "web-fragment-2name.xml", true));
> +        parse(new WebXml(), "web-fragment-2name.xml", true, false);
>     }
>
>
> @@ -62,7 +62,7 @@ public class TestWebRuleSet {
>
>         WebXml webXml = new WebXml();
>
> -        assertTrue(parse(webXml, "web-fragment-1ordering.xml", true));
> +        parse(webXml, "web-fragment-1ordering.xml", true, true);
>         assertEquals(1, webXml.getBeforeOrdering().size());
>         assertTrue(webXml.getBeforeOrdering().contains("bar"));
>     }
> @@ -70,7 +70,7 @@ public class TestWebRuleSet {
>
>     @Test
>     public void testMultipleOrderingInWebFragmentXml() throws Exception {
> -        assertFalse(parse(new WebXml(), "web-fragment-2ordering.xml", true));
> +        parse(new WebXml(), "web-fragment-2ordering.xml", true, false);
>     }
>
>
> @@ -79,7 +79,7 @@ public class TestWebRuleSet {
>
>         WebXml webXml = new WebXml();
>
> -        assertTrue(parse(webXml, "web-1ordering.xml", false));
> +        parse(webXml, "web-1ordering.xml", false, true);
>         assertEquals(1, webXml.getAbsoluteOrdering().size());
>         assertTrue(webXml.getAbsoluteOrdering().contains("bar"));
>     }
> @@ -87,34 +87,34 @@ public class TestWebRuleSet {
>
>     @Test
>     public void testMultipleOrderingInWebXml() throws Exception {
> -        assertFalse(parse(new WebXml(), "web-2ordering.xml", false));
> +        parse(new WebXml(), "web-2ordering.xml", false, false);
>     }
>
>
>     @Test
>     public void testRecycle() throws Exception {
>         // Name
> -        assertFalse(parse(new WebXml(), "web-fragment-2name.xml", true));
> -        assertTrue(parse(new WebXml(), "web-fragment-1name.xml", true));
> -        assertFalse(parse(new WebXml(), "web-fragment-2name.xml", true));
> -        assertTrue(parse(new WebXml(), "web-fragment-1name.xml", true));
> +        parse(new WebXml(), "web-fragment-2name.xml", true, false);
> +        parse(new WebXml(), "web-fragment-1name.xml", true, true);
> +        parse(new WebXml(), "web-fragment-2name.xml", true, false);
> +        parse(new WebXml(), "web-fragment-1name.xml", true, true);
>
>         // Relative ordering
> -        assertFalse(parse(new WebXml(), "web-fragment-2ordering.xml", true));
> -        assertTrue(parse(new WebXml(), "web-fragment-1ordering.xml", true));
> -        assertFalse(parse(new WebXml(), "web-fragment-2ordering.xml", true));
> -        assertTrue(parse(new WebXml(), "web-fragment-1ordering.xml", true));
> +        parse(new WebXml(), "web-fragment-2ordering.xml", true, false);
> +        parse(new WebXml(), "web-fragment-1ordering.xml", true, true);
> +        parse(new WebXml(), "web-fragment-2ordering.xml", true, false);
> +        parse(new WebXml(), "web-fragment-1ordering.xml", true, true);
>
>         // Absolute ordering
> -        assertFalse(parse(new WebXml(), "web-2ordering.xml", false));
> -        assertTrue(parse(new WebXml(), "web-1ordering.xml", false));
> -        assertFalse(parse(new WebXml(), "web-2ordering.xml", false));
> -        assertTrue(parse(new WebXml(), "web-1ordering.xml", false));
> +        parse(new WebXml(), "web-2ordering.xml", false, false);
> +        parse(new WebXml(), "web-1ordering.xml", false, true);
> +        parse(new WebXml(), "web-2ordering.xml", false, false);
> +        parse(new WebXml(), "web-1ordering.xml", false, true);
>  }
>
>
> -    private synchronized boolean parse(WebXml webXml, String target,
> -            boolean fragment) {
> +    private synchronized void parse(WebXml webXml, String target,
> +            boolean fragment, boolean expected) {
>
>         Digester d;
>         if (fragment) {
> @@ -135,9 +135,17 @@ public class TestWebRuleSet {
>         try {
>             d.parse(is);
>         } catch (Exception e) {
> +            if (expected) {
> +                // Didn't expect an exception
> +                e.printStackTrace();
> +            }
>             result = false;
>         }
>
> -        return result;
> +        if (expected) {
> +            assertTrue(result);
> +        } else {
> +            assertFalse(result);
> +        }
>     }
>  }
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
> For additional commands, e-mail: dev-help@tomcat.apache.org
>

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


Mime
View raw message