apache / apache/maven-surefire
[SUREFIRE-1971] Latest 3.0.0-M5 release AND latest junit5 unknown fork error
- Dominant language
- Java
- Stars
- 461
- Forks
- 588
- Avg merge
- 1d 8h
- Merged PRs (30d)
- 19
Description
**[BRENT RYAN](https://issues.apache.org/jira/secure/ViewProfile.jspa?name=JIRAUSER282546)** opened **[SUREFIRE-1971](https://issues.apache.org/jira/browse/SUREFIRE-1971?redirect=false)** and commented
See further details here:
`[https://github.com/dropwizard/dropwizard/issues/4538]`
`When running latest version of surefire plugin and latest version of junit it causes a failure in the ``goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test`
`If you use junit 5.7.2 then it works fine or you can use junit 5.8.2 + maven-surefire-plugin 2.22.2 and it works fine. But if you use both together then it results in:`
```java
18:47:27 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test (default-test) on project *****: There are test failures.
18:47:27 [ERROR]
18:47:27 [ERROR] Please refer to ***/target/surefire-reports for the individual test results.
18:47:27 [ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
18:47:27 [ERROR] There was an error in the forked process
18:47:27 [ERROR] org.apache.maven.surefire.booter.SurefireBooterForkException: There was an error in the forked process
18:47:27 [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:733)
18:47:27 [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:305)
18:47:27 [ERROR] at org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:265)
18:47:27 [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1314)
18:47:27 [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1159)
18:47:27 [ERROR] at org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:932)
18:47:27 [ERROR] at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
18:47:27 [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
18:47:27 [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
18:47:27 [ERROR] at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
18:47:27 [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
18:47:27 [ERROR] at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
18:47:27 [ERROR] at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
18:47:27 [ERROR] at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
18:47:27 [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
18:47:27 [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
18:47:27 [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
18:47:27 [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
18:47:27 [ERROR] at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
18:47:27 [ERROR] at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
18:47:27 [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
18:47:27 [ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
18:47:27 [ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
18:47:27 [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:566)
18:47:27 [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
18:47:27 [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
18:47:27 [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
18:47:27 [ERROR] at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
18:47:27 [ERROR] -> [Help 1]
```
It's also worth noting that we've been unable to reproduce this locally (using macbook pro). This seems to only happen on build machines where the build/compile/test runs inside of docker containers. If you try to run the same docker container locally with the same tests then it seems to also work.
---
**Affects:** 3.0.0-M5
**Attachments:**
- [error.log](https://issues.apache.org/jira/secure/attachment/13037976/error.log) (_58.77 kB_)
Contributor guide
Research direction
Start with the attached error.log and the reported org.apache.maven.plugins:maven-surefire-plugin:3.0.0-M5:test failure, comparing JUnit 5.7.2 with Surefire 3.0.0-M5 and JUnit 5.8.2 with Surefire 2.22.2. Reproduce the failure in the Docker build-machine setup and inspect the target/surefire-reports and forked-process stack trace. Done means the incompatible version combination is diagnosed and the failure is fixed or covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- build-system, testing
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100