Quantcast

Tests fail to fork

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Tests fail to fork

aquezada
I've a strange issue, and it's possibly related to running in a virtual machine, but most likely an environment issue.

I have some tests that run fine from my Mac, but when I run the same ones in an Ubuntu VM, the fail without error.  I ran maven with the -X flag, and the key output is below.  What's strange is that a surefire directory is not even created.  However, if I run the fork command on the command line, it works just fine (and then the reports are added)! And again, the same maven command (yes, same maven version 2.2.1) works fine on my mac.  I'm ran this as mvn -X -Dtest=PageImagerTest clean test, but running for all tests has the same result. Any ideas?

[INFO] Surefire report directory: /home/user/svn/content-crawler-app/content-crawler-common/target/surefire-reports
Forking command line: /bin/sh -c cd /home/user/svn/content-crawler-app/content-crawler-common && /usr/local/jdk1.6.0_23/jre/bin/java -Xms256m -Xmx512m -jar /tmp/surefirebooter5363366684365451272.jar /tmp/surefire4458674373778463629tmp /tmp/surefire856130898737172343tmp
[INFO] ------------------------------------------------------------------------
[ERROR] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] There are test failures.

Please refer to /home/user/svn/content-crawler-app/content-crawler-common/target/surefire-reports for the individual test results.
[INFO] ------------------------------------------------------------------------
[DEBUG] Trace
org.apache.maven.BuildFailureException: There are test failures.

Please refer to /home/user/svn/content-crawler-app/content-crawler-common/target/surefire-reports for the individual test results.
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:715)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
        at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
        at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
        at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
        at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
        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.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
Please refer to /home/user/svn/content-crawler-app/content-crawler-common/target/surefire-reports for the individual test results.
        at org.apache.maven.plugin.surefire.SurefirePlugin.execute(SurefirePlugin.java:629)
        at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
        at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
        ... 17 more
[INFO] ------------------------------------------------------------------------
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tests fail to fork

aquezada
Just to add that I'm running surefire 2.5, which apparently is the default.  I don't have any explicit plugin configuration for surefire in my pom.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Tests fail to fork

Wayne Fay
In reply to this post by aquezada
> I have some tests that run fine from my Mac, but when I run the same ones in
> an Ubuntu VM, the fail without error.  I ran maven with the -X flag, and the

Most likely you are running into privileges issues on Ubuntu, I would expect.

> key output is below.  What's strange is that a surefire directory is not
> even created.  However, if I run the fork command on the command line, it
> ...
> Forking command line: /bin/sh -c cd
> /home/user/svn/content-crawler-app/content-crawler-common &&
> /usr/local/jdk1.6.0_23/jre/bin/java -Xms256m -Xmx512m -jar

Is this the right jdk path? You said "if I run the fork command on the
command line" -- did you include the /bin/sh part? Do you have know
what dot-files and profiles etc are being applied when that child
shell process gets started up? I'd suspect something related to that
is your issue.

> /tmp/surefirebooter5363366684365451272.jar
> /tmp/surefire4458674373778463629tmp /tmp/surefire856130898737172343tmp

Does this userid have privileges to create files and/or directories in /tmp?

> Please refer to
> /home/user/svn/content-crawler-app/content-crawler-common/target/surefire-reports
> for the individual test results.

Does this userid have privileges to create the directory
/target/surefire-reports?

Wayne

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Loading...