Debugging Sling Models IT
HI, I need some help with resolving failures in the models.integration-tests module (don’t worry, those only fail for me due to some local changes). I tried to run the integration-tests with mvn install with the option keepJarRunningtrue/keepJarRunning (set inside the pom.xml) and to start the launchpad with the remote debugging options set. Now I get the following exception when executing the integration test 32492 [main] ERROR org.apache.sling.models.it.RemoteIT - Exception in maybeStartServer() java.lang.IllegalMonitorStateException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at org.apache.sling.testing.tools.sling.SlingTestBase.blockIfRequested(SlingTestBase.java:234) at org.apache.sling.testing.tools.sling.SlingTestBase.startServerIfNeeded(SlingTestBase.java:152) at org.apache.sling.testing.tools.sling.SlingTestBase.getServerBaseUrl(SlingTestBase.java:211) at org.apache.sling.models.it.RemoteIT.getJunitServletUrl(RemoteIT.java:28) at org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner.maybeExecuteTests(SlingRemoteTestRunner.java:95) at org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner.getChildren(SlingRemoteTestRunner.java:138) at org.junit.runners.ParentRunner.getFilteredChildren(ParentRunner.java:363) at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:297) at org.junit.runners.ParentRunner.run(ParentRunner.java:305) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) I don’t know why the IllegalMonitorStateException is triggered there. Any idea? Thanks in advance, Konrad
RE: Debugging Sling Models IT
what i did was adding the JVM debugging parameters the IT sling instance startup (jar.executor.vm.options, commented out), and then attached to the IT JVM while it was starting up (it takes some seconds while bundles are deploying before the tests really gets executed, so it's no problem to attach to it before they start). then the IT's stopped at my breakpoints as expected. i never used the keepJarRunning flag. stefan -Original Message- From: Konrad Windszus [mailto:konra...@gmx.de] Sent: Friday, December 05, 2014 4:42 PM To: dev@sling.apache.org Subject: Debugging Sling Models IT HI, I need some help with resolving failures in the models.integration- tests module (don’t worry, those only fail for me due to some local changes). I tried to run the integration-tests with mvn install with the option keepJarRunningtrue/keepJarRunning (set inside the pom.xml) and to start the launchpad with the remote debugging options set. Now I get the following exception when executing the integration test 32492 [main] ERROR org.apache.sling.models.it.RemoteIT - Exception in maybeStartServer() java.lang.IllegalMonitorStateException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at org.apache.sling.testing.tools.sling.SlingTestBase.blockIfRequested(Sl ingTestBase.java:234) at org.apache.sling.testing.tools.sling.SlingTestBase.startServerIfNeeded (SlingTestBase.java:152) at org.apache.sling.testing.tools.sling.SlingTestBase.getServerBaseUrl(Sl ingTestBase.java:211) at org.apache.sling.models.it.RemoteIT.getJunitServletUrl(RemoteIT.java:2 8) at org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner.maybeEx ecuteTests(SlingRemoteTestRunner.java:95) at org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner.getChil dren(SlingRemoteTestRunner.java:138) at org.junit.runners.ParentRunner.getFilteredChildren(ParentRunner.java:3 63) at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:297) at org.junit.runners.ParentRunner.run(ParentRunner.java:305) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider .java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4P rovider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider. java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClas sLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(Forke dBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:1 03) I don’t know why the IllegalMonitorStateException is triggered there. Any idea? Thanks in advance, Konrad
Re: Debugging Sling Models IT
Hi Konrad, On Dec 5, 2014 5:42 PM, Konrad Windszus konra...@gmx.de wrote: HI, I need some help with resolving failures in the models.integration-tests module (don’t worry, those only fail for me due to some local changes). I tried to run the integration-tests with mvn install with the option keepJarRunningtrue/keepJarRunning (set inside the pom.xml) and to start the launchpad with the remote debugging options set. Now I get the following exception when executing the integration test 32492 [main] ERROR org.apache.sling.models.it.RemoteIT - Exception in maybeStartServer() java.lang.IllegalMonitorStateException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at org.apache.sling.testing.tools.sling.SlingTestBase.blockIfRequested(SlingTestBase.java:234) at org.apache.sling.testing.tools.sling.SlingTestBase.startServerIfNeeded(SlingTestBase.java:152) at org.apache.sling.testing.tools.sling.SlingTestBase.getServerBaseUrl(SlingTestBase.java:211) at org.apache.sling.models.it.RemoteIT.getJunitServletUrl(RemoteIT.java:28) at org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner.maybeExecuteTests(SlingRemoteTestRunner.java:95) at org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner.getChildren(SlingRemoteTestRunner.java:138) at org.junit.runners.ParentRunner.getFilteredChildren(ParentRunner.java:363) at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:297) at org.junit.runners.ParentRunner.run(ParentRunner.java:305) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) I don’t know why the IllegalMonitorStateException is triggered there. Any idea? Thanks in advance, Konrad Looks familiar. Can you try depending on a more recent version of the Sling testing tools? Can't dig up the issue right now since I'm on mobile... Robert
Re: Debugging Sling Models IT
Hi Robert, I found the according issue: https://issues.apache.org/jira/browse/SLING-3819 https://issues.apache.org/jira/browse/SLING-3819. Thanks for the hint. What about a new release of the sling testing tools? Thanks again, Konrad On 05 Dec 2014, at 17:16, Robert Munteanu robert.munte...@gmail.com wrote: Hi Konrad, On Dec 5, 2014 5:42 PM, Konrad Windszus konra...@gmx.de wrote: HI, I need some help with resolving failures in the models.integration-tests module (don’t worry, those only fail for me due to some local changes). I tried to run the integration-tests with mvn install with the option keepJarRunningtrue/keepJarRunning (set inside the pom.xml) and to start the launchpad with the remote debugging options set. Now I get the following exception when executing the integration test 32492 [main] ERROR org.apache.sling.models.it.RemoteIT - Exception in maybeStartServer() java.lang.IllegalMonitorStateException at java.lang.Object.wait(Native Method) at java.lang.Object.wait(Object.java:503) at org.apache.sling.testing.tools.sling.SlingTestBase.blockIfRequested(SlingTestBase.java:234) at org.apache.sling.testing.tools.sling.SlingTestBase.startServerIfNeeded(SlingTestBase.java:152) at org.apache.sling.testing.tools.sling.SlingTestBase.getServerBaseUrl(SlingTestBase.java:211) at org.apache.sling.models.it.RemoteIT.getJunitServletUrl(RemoteIT.java:28) at org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner.maybeExecuteTests(SlingRemoteTestRunner.java:95) at org.apache.sling.junit.remote.testrunner.SlingRemoteTestRunner.getChildren(SlingRemoteTestRunner.java:138) at org.junit.runners.ParentRunner.getFilteredChildren(ParentRunner.java:363) at org.junit.runners.ParentRunner.getDescription(ParentRunner.java:297) at org.junit.runners.ParentRunner.run(ParentRunner.java:305) at org.apache.maven.surefire.junit4.JUnit4Provider.execute(JUnit4Provider.java:264) at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:153) at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:124) at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200) at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153) at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103) I don’t know why the IllegalMonitorStateException is triggered there. Any idea? Thanks in advance, Konrad Looks familiar. Can you try depending on a more recent version of the Sling testing tools? Can't dig up the issue right now since I'm on mobile... Robert
Re: Debugging Sling Models IT
On Fri, Dec 5, 2014 at 6:13 PM, Konrad Windszus konra...@gmx.de wrote: ...What about a new release of the sling testing tools?... That's on my list but if someone beats me to it I won't complain ;-) -Bertrand