You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Chetan Mehrotra <ch...@gmail.com> on 2013/11/13 14:54:22 UTC

Failure while running integration test

Hi,

I am try to run integration test by executing following command at
<trunk>launchpad/testing

mvn clean install

However it results in following exception. Is this the right way to
test or I need to follow some other steps

[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.maven.plugins:maven-failsafe-plugin:2.16:integration-test
(default) on project org.apache.sling.launchpad.testing: Execution
default of goal
org.apache.maven.plugins:maven-failsafe-plugin:2.16:integration-test
failed: There was an error in the forked process
[ERROR] java.lang.RuntimeException: Unable to load category:
org.apache.sling.commons.testing.junit.categories.OakOnly
[ERROR] at org.apache.maven.surefire.group.match.SingleGroupMatcher.loadGroupClasses(SingleGroupMatcher.java:134)
[ERROR] at org.apache.maven.surefire.common.junit48.FilterFactory.createGroupFilter(FilterFactory.java:94)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.createJUnit48Filter(JUnitCoreProvider.java:177)
[ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:113)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
[ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
[ERROR] Caused by: java.lang.ClassNotFoundException:
org.apache.sling.commons.testing.junit.categories.OakOnly
[ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
[ERROR] at java.security.AccessController.doPrivileged(Native Method)
[ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
[ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
[ERROR] at org.apache.maven.surefire.group.match.SingleGroupMatcher.loadGroupClasses(SingleGroupMatcher.java:130)
[ERROR] ... 6 more
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with
the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions,
please read the following articles:
[ERROR] [Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException

Chetan Mehrotra

Re: Failure while running integration test

Posted by Chetan Mehrotra <ch...@gmail.com>.
If I build 'sling/launchpad/integration-tests' then it fixes the
issue. So problem resolved for now. Looks like I was having a stale
snapshot
Chetan Mehrotra


On Wed, Nov 13, 2013 at 8:48 PM, Bertrand Delacretaz
<bd...@apache.org> wrote:
> Hi,
>
> On Wed, Nov 13, 2013 at 3:39 PM, Chetan Mehrotra
> <ch...@gmail.com> wrote:
>>> [ERROR] Caused by: java.lang.ClassNotFoundException:
>>> org.apache.sling.commons.testing.junit.categories.OakOnly
>>
>> Adding org.apache.sling.commons.testing as a dependency in the
>> integrationTesting profile seems to resolve the issue...
>
> Yes, makes sense - for now the integration tests are using a snapshot
> of commons.testing, so maybe building that one by hand before running
> the tests would have helped as well.
>
> Radu asked for a release of commons.testing as well, I'll try to
> prepare that release tomorrow to solve this in a cleaner way.
> -Bertrand

Re: Failure while running integration test

Posted by Bertrand Delacretaz <bd...@apache.org>.
Hi,

On Wed, Nov 13, 2013 at 3:39 PM, Chetan Mehrotra
<ch...@gmail.com> wrote:
>> [ERROR] Caused by: java.lang.ClassNotFoundException:
>> org.apache.sling.commons.testing.junit.categories.OakOnly
>
> Adding org.apache.sling.commons.testing as a dependency in the
> integrationTesting profile seems to resolve the issue...

Yes, makes sense - for now the integration tests are using a snapshot
of commons.testing, so maybe building that one by hand before running
the tests would have helped as well.

Radu asked for a release of commons.testing as well, I'll try to
prepare that release tomorrow to solve this in a cleaner way.
-Bertrand

Re: Failure while running integration test

Posted by Chetan Mehrotra <ch...@gmail.com>.
> [ERROR] Caused by: java.lang.ClassNotFoundException:
> org.apache.sling.commons.testing.junit.categories.OakOnly

Adding org.apache.sling.commons.testing as a dependency in the
integrationTesting profile seems to resolve the issue
Chetan Mehrotra


On Wed, Nov 13, 2013 at 7:24 PM, Chetan Mehrotra
<ch...@gmail.com> wrote:
> Hi,
>
> I am try to run integration test by executing following command at
> <trunk>launchpad/testing
>
> mvn clean install
>
> However it results in following exception. Is this the right way to
> test or I need to follow some other steps
>
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-failsafe-plugin:2.16:integration-test
> (default) on project org.apache.sling.launchpad.testing: Execution
> default of goal
> org.apache.maven.plugins:maven-failsafe-plugin:2.16:integration-test
> failed: There was an error in the forked process
> [ERROR] java.lang.RuntimeException: Unable to load category:
> org.apache.sling.commons.testing.junit.categories.OakOnly
> [ERROR] at org.apache.maven.surefire.group.match.SingleGroupMatcher.loadGroupClasses(SingleGroupMatcher.java:134)
> [ERROR] at org.apache.maven.surefire.common.junit48.FilterFactory.createGroupFilter(FilterFactory.java:94)
> [ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.createJUnit48Filter(JUnitCoreProvider.java:177)
> [ERROR] at org.apache.maven.surefire.junitcore.JUnitCoreProvider.invoke(JUnitCoreProvider.java:113)
> [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:200)
> [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:153)
> [ERROR] at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:103)
> [ERROR] Caused by: java.lang.ClassNotFoundException:
> org.apache.sling.commons.testing.junit.categories.OakOnly
> [ERROR] at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> [ERROR] at java.security.AccessController.doPrivileged(Native Method)
> [ERROR] at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> [ERROR] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> [ERROR] at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> [ERROR] at org.apache.maven.surefire.group.match.SingleGroupMatcher.loadGroupClasses(SingleGroupMatcher.java:130)
> [ERROR] ... 6 more
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with
> the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions,
> please read the following articles:
> [ERROR] [Help 1]
> http://cwiki.apache.org/confluence/display/MAVEN/PluginExecutionException
>
> Chetan Mehrotra