You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Dishara Wijewardana <dd...@gmail.com> on 2013/08/21 09:57:05 UTC

[PlanetResource] Integration test failure in trunk/launchpad/

Hi,
I started the launchpad jar and ran mvn test
-Dtest=PlanetsResourceProviderTest in trunk. And Integration tests fails
with following.

junit.framework.AssertionFailedError: Expected status 200 for
http://localhost:8080/planets.tidy.-1.json (content=<!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>404 No resource found</title>
</head>
<body>
<h1>No resource found (404)</h1>
<p>The requested URL /planets.tidy.-1.json resulted in an error in
org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet.</p>
<h3>Request Progress:</h3>
<pre>
      0 (2013-08-21 13:22:40) TIMER_START{Request Processing}
      0 (2013-08-21 13:22:40) COMMENT timer_end format is {&lt;elapsed
msec&gt;,&lt;timer name&gt;} &lt;optional message&gt;
      0 (2013-08-21 13:22:40) LOG Method=GET, PathInfo=/planets.tidy.-1.json
      0 (2013-08-21 13:22:40) TIMER_START{ResourceResolution}
      2 (2013-08-21 13:22:40) TIMER_END{2,ResourceResolution}
URI=/planets.tidy.-1.json resolves to Resource=NonExistingResource,
path=/planets.tidy.-1.json
      2 (2013-08-21 13:22:40) LOG Resource Path Info: SlingRequestPathInfo:
path='/planets.tidy.-1.json', selectorString='tidy.-1', extension='json',
suffix='null'
      2 (2013-08-21 13:22:40) TIMER_START{ServletResolution}
      2 (2013-08-21 13:22:40)
TIMER_START{resolveServlet(NonExistingResource, path=/planets.tidy.-1.json)}
      3 (2013-08-21 13:22:40)
TIMER_END{1,resolveServlet(NonExistingResource,
path=/planets.tidy.-1.json)} Using servlet
org.apache.sling.servlets.get.DefaultGetServlet
      3 (2013-08-21 13:22:40) TIMER_END{1,ServletResolution}
URI=/planets.tidy.-1.json handled by
Servlet=org.apache.sling.servlets.get.DefaultGetServlet
      3 (2013-08-21 13:22:40) LOG Applying Requestfilters
      3 (2013-08-21 13:22:40) LOG Calling filter:
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
      3 (2013-08-21 13:22:40)
TIMER_START{org.apache.sling.servlets.get.DefaultGetServlet#0}
      3 (2013-08-21 13:22:40)
TIMER_END{0,org.apache.sling.servlets.get.DefaultGetServlet#0}
      3 (2013-08-21 13:22:40) TIMER_START{handleError:status=404}
      4 (2013-08-21 13:22:40) TIMER_END{1,handleError:status=404} Using
handler
org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet
      4 (2013-08-21 13:22:40) TIMER_END{4,Request Processing} Dumping
SlingRequestProgressTracker Entries
</pre>
<hr>
<address>ApacheSling/2.2 (jetty/6.1.x, OpenJDK 64-Bit Server VM 1.6.0_27,
Linux 3.0.0-12-generic amd64)</address>
</body>
</html>
) expected:<200> but was:<404>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:277)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:195)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:380)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:355)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:347)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:342)
at
org.apache.sling.launchpad.webapp.integrationtest.resourceprovider.PlanetsResourceProviderTest.assertStrings(PlanetsResourceProviderTest.java:26)
at
org.apache.sling.launchpad.webapp.integrationtest.resourceprovider.PlanetsResourceProviderTest.testRootResource(PlanetsResourceProviderTest.java:37)
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 junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

testEarthResource(org.apache.sling.launchpad.webapp.integrationtest.resourceprovider.PlanetsResourceProviderTest)
 Time elapsed: 0.011 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Expected status 200 for
http://localhost:8080/planets.tidy.-1.json (content=<!DOCTYPE HTML PUBLIC
"-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>404 No resource found</title>
</head>
<body>
<h1>No resource found (404)</h1>
<p>The requested URL /planets.tidy.-1.json resulted in an error in
org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet.</p>
<h3>Request Progress:</h3>
<pre>
      0 (2013-08-21 13:22:40) TIMER_START{Request Processing}
      0 (2013-08-21 13:22:40) COMMENT timer_end format is {&lt;elapsed
msec&gt;,&lt;timer name&gt;} &lt;optional message&gt;
      0 (2013-08-21 13:22:40) LOG Method=GET, PathInfo=/planets.tidy.-1.json
      0 (2013-08-21 13:22:40) TIMER_START{ResourceResolution}
      1 (2013-08-21 13:22:40) TIMER_END{1,ResourceResolution}
URI=/planets.tidy.-1.json resolves to Resource=NonExistingResource,
path=/planets.tidy.-1.json
      1 (2013-08-21 13:22:40) LOG Resource Path Info: SlingRequestPathInfo:
path='/planets.tidy.-1.json', selectorString='tidy.-1', extension='json',
suffix='null'
      1 (2013-08-21 13:22:40) TIMER_START{ServletResolution}
      1 (2013-08-21 13:22:40)
TIMER_START{resolveServlet(NonExistingResource, path=/planets.tidy.-1.json)}
      1 (2013-08-21 13:22:40)
TIMER_END{0,resolveServlet(NonExistingResource,
path=/planets.tidy.-1.json)} Using servlet
org.apache.sling.servlets.get.DefaultGetServlet
      1 (2013-08-21 13:22:40) TIMER_END{0,ServletResolution}
URI=/planets.tidy.-1.json handled by
Servlet=org.apache.sling.servlets.get.DefaultGetServlet
      1 (2013-08-21 13:22:40) LOG Applying Requestfilters
      1 (2013-08-21 13:22:40) LOG Calling filter:
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
      1 (2013-08-21 13:22:40)
TIMER_START{org.apache.sling.servlets.get.DefaultGetServlet#0}
      2 (2013-08-21 13:22:40)
TIMER_END{1,org.apache.sling.servlets.get.DefaultGetServlet#0}
      2 (2013-08-21 13:22:40) TIMER_START{handleError:status=404}
      2 (2013-08-21 13:22:40) TIMER_END{0,handleError:status=404} Using
handler
org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet
      3 (2013-08-21 13:22:40) TIMER_END{3,Request Processing} Dumping
SlingRequestProgressTracker Entries
</pre>
<hr>
<address>ApacheSling/2.2 (jetty/6.1.x, OpenJDK 64-Bit Server VM 1.6.0_27,
Linux 3.0.0-12-generic amd64)</address>
</body>
</html>
) expected:<200> but was:<404>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:277)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:195)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:380)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:355)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:347)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:342)
at
org.apache.sling.launchpad.webapp.integrationtest.resourceprovider.PlanetsResourceProviderTest.assertStrings(PlanetsResourceProviderTest.java:26)
at
org.apache.sling.launchpad.webapp.integrationtest.resourceprovider.PlanetsResourceProviderTest.testEarthResource(PlanetsResourceProviderTest.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 junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)

testMoonResource(org.apache.sling.launchpad.webapp.integrationtest.resourceprovider.PlanetsResourceProviderTest)
 Time elapsed: 0.019 sec  <<< FAILURE!
junit.framework.AssertionFailedError: Expected status 200 for
http://localhost:8080/planets/earth/moon.tidy.json (content=<!DOCTYPE HTML
PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html>
<head>
<title>404 No resource found</title>
</head>
<body>
<h1>No resource found (404)</h1>
<p>The requested URL /planets/earth/moon.tidy.json resulted in an error in
org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet.</p>
<h3>Request Progress:</h3>
<pre>
      0 (2013-08-21 13:22:40) TIMER_START{Request Processing}
      0 (2013-08-21 13:22:40) COMMENT timer_end format is {&lt;elapsed
msec&gt;,&lt;timer name&gt;} &lt;optional message&gt;
      0 (2013-08-21 13:22:40) LOG Method=GET,
PathInfo=/planets/earth/moon.tidy.json
      0 (2013-08-21 13:22:40) TIMER_START{ResourceResolution}
      2 (2013-08-21 13:22:40) TIMER_END{2,ResourceResolution}
URI=/planets/earth/moon.tidy.json resolves to Resource=NonExistingResource,
path=/planets/earth/moon.tidy.json
      2 (2013-08-21 13:22:40) LOG Resource Path Info: SlingRequestPathInfo:
path='/planets/earth/moon.tidy.json', selectorString='tidy',
extension='json', suffix='null'
      2 (2013-08-21 13:22:40) TIMER_START{ServletResolution}
      2 (2013-08-21 13:22:40)
TIMER_START{resolveServlet(NonExistingResource,
path=/planets/earth/moon.tidy.json)}
      3 (2013-08-21 13:22:40)
TIMER_END{1,resolveServlet(NonExistingResource,
path=/planets/earth/moon.tidy.json)} Using servlet
org.apache.sling.servlets.get.DefaultGetServlet
      3 (2013-08-21 13:22:40) TIMER_END{1,ServletResolution}
URI=/planets/earth/moon.tidy.json handled by
Servlet=org.apache.sling.servlets.get.DefaultGetServlet
      3 (2013-08-21 13:22:40) LOG Applying Requestfilters
      3 (2013-08-21 13:22:40) LOG Calling filter:
org.apache.sling.engine.impl.debug.RequestProgressTrackerLogFilter
      3 (2013-08-21 13:22:40)
TIMER_START{org.apache.sling.servlets.get.DefaultGetServlet#0}
      3 (2013-08-21 13:22:40)
TIMER_END{0,org.apache.sling.servlets.get.DefaultGetServlet#0}
      3 (2013-08-21 13:22:40) TIMER_START{handleError:status=404}
      4 (2013-08-21 13:22:40) TIMER_END{1,handleError:status=404} Using
handler
org.apache.sling.servlets.resolver.internal.defaults.DefaultErrorHandlerServlet
      4 (2013-08-21 13:22:40) TIMER_END{4,Request Processing} Dumping
SlingRequestProgressTracker Entries
</pre>
<hr>
<address>ApacheSling/2.2 (jetty/6.1.x, OpenJDK 64-Bit Server VM 1.6.0_27,
Linux 3.0.0-12-generic amd64)</address>
</body>
</html>
) expected:<200> but was:<404>
at junit.framework.Assert.fail(Assert.java:47)
at junit.framework.Assert.failNotEquals(Assert.java:277)
at junit.framework.Assert.assertEquals(Assert.java:64)
at junit.framework.Assert.assertEquals(Assert.java:195)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:380)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:355)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:347)
at
org.apache.sling.commons.testing.integration.HttpTestBase.getContent(HttpTestBase.java:342)
at
org.apache.sling.launchpad.webapp.integrationtest.resourceprovider.PlanetsResourceProviderTest.assertStrings(PlanetsResourceProviderTest.java:26)
at
org.apache.sling.launchpad.webapp.integrationtest.resourceprovider.PlanetsResourceProviderTest.testMoonResource(PlanetsResourceProviderTest.java:62)
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 junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at
org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:81)
at
org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:252)
at
org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:141)
at
org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:112)
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.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:189)
at
org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:165)
at
org.apache.maven.surefire.booter.ProviderFactory.invokeProvider(ProviderFactory.java:85)
at
org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:115)
at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:75)


Results :

Failed tests:
testRootResource(org.apache.sling.launchpad.webapp.integrationtest.resourceprovider.PlanetsResourceProviderTest):
Expected status 200 for
http://localhost:8080/planets.tidy.-1.json(content=<!DOCTYPE HTML
PUBLIC "-//IETF//DTD HTML 2.0//EN">(..)

testEarthResource(org.apache.sling.launchpad.webapp.integrationtest.resourceprovider.PlanetsResourceProviderTest):
Expected status 200 for
http://localhost:8080/planets.tidy.-1.json(content=<!DOCTYPE HTML
PUBLIC "-//IETF//DTD HTML 2.0//EN">(..)

testMoonResource(org.apache.sling.launchpad.webapp.integrationtest.resourceprovider.PlanetsResourceProviderTest):
Expected status 200 for
http://localhost:8080/planets/earth/moon.tidy.json(content=<!DOCTYPE
HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">(..)

Tests run: 3, Failures: 3, Errors: 0, Skipped: 0



-- 
Thanks
/Dishara