Skip to content

Cannot re-execute "Test File" without BUILD FAILURE #5122

@pdurbin

Description

@pdurbin

I'm on 6eecbf1 on the 4261-sitemap branch (pull request #5084) and seeing some strange behavior with running unit tests, perhaps because pull request #5071 was recently merged.

When I run SiteMapUtilTest with "Test File" in Netbeans as described at http://guides.dataverse.org/en/4.9.2/developers/testing.html#writing-unit-tests-with-junit it works fine and the tests pass, but only if I do a mvn clean first. Here are some screenshots with the steps I'm using to reproduce. I'm using Netbeans 8.2.

First, I run a mvn clean (no changes have been made to the code):

screen shot 2018-10-01 at 9 52 18 am

Then I click "Test File":

screen shot 2018-10-01 at 9 43 10 am

The first "Test File" works:

screen shot 2018-10-01 at 9 44 08 am

Then I click "Test File" again:

screen shot 2018-10-01 at 9 44 19 am

The second "Test File" results in BUILD FAILURE:

screen shot 2018-10-01 at 9 44 59 am

Here are the details of the failure in the screenshot above:

------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 4.040s
Finished at: Mon Oct 01 09:44:42 EDT 2018
Final Memory: 26M/564M
------------------------------------------------------------------------
Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.0:test (default-cli) on project dataverse: There are test failures.

Please refer to /Users/pdurbin/NetBeansProjects/dataverse/target/surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream and [date]-jvmRun[N].dumpstream.
The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was /bin/sh -c cd /Users/pdurbin/NetBeansProjects/dataverse && /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/bin/java '${argLine}' -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -jar /Users/pdurbin/NetBeansProjects/dataverse/target/surefire/surefirebooter8926035618084320581.jar /Users/pdurbin/NetBeansProjects/dataverse/target/surefire 2018-10-01T09-44-42_201-jvmRun1 surefire353471048469144277tmp surefire_05549499524846273060tmp
Error occurred in starting fork, check output in log
Process Exit Code: 1
org.apache.maven.surefire.booter.SurefireBooterForkException: The forked VM terminated without properly saying goodbye. VM crash or System.exit called?
Command was /bin/sh -c cd /Users/pdurbin/NetBeansProjects/dataverse && /Library/Java/JavaVirtualMachines/jdk1.8.0_74.jdk/Contents/Home/jre/bin/java '${argLine}' -Duser.timezone=UTC -Dfile.encoding=UTF-8 -Duser.language=en -Duser.region=US -jar /Users/pdurbin/NetBeansProjects/dataverse/target/surefire/surefirebooter8926035618084320581.jar /Users/pdurbin/NetBeansProjects/dataverse/target/surefire 2018-10-01T09-44-42_201-jvmRun1 surefire353471048469144277tmp surefire_05549499524846273060tmp
Error occurred in starting fork, check output in log
Process Exit Code: 1
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:671)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:278)
at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:244)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:209)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:84)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:59)
at org.apache.maven.lifecycle.internal.LifecycleStarter.singleThreadedBuild(LifecycleStarter.java:183)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:161)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:320)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:156)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:537)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:196)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:141)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:290)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:230)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:409)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:352)
-> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions