[
https://issues.apache.org/jira/browse/SUREFIRE-1778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17088742#comment-17088742
]
Mohammed Zrieq commented on SUREFIRE-1778:
------------------------------------------
[~tibordigana] Thanks for the fast turn around.
So the problem only occurs when trying to fork the process, without forking it
works fine. It seems some bug in the Junit runner as you mentioned.
A side question from this, why the parallel classes is useless?
> Parallel forking in maven-failsafe-plugin always ends with exception
> --------------------------------------------------------------------
>
> Key: SUREFIRE-1778
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1778
> Project: Maven Surefire
> Issue Type: Bug
> Components: process forking
> Affects Versions: 2.22.0, 2.22.1, 2.22.2, 3.0.0-M2, 3.0.0-M1, 3.0.0-M3,
> 3.0.0-M4
> Reporter: Mohammed Zrieq
> Priority: Critical
>
> I am trying to parallelized execution of Serenity (JUnit runners) in our
> project that uses Serenity and JBehave.
> When running the tests without forking everything works fine.
> However, when trying to fork the process, the execution for test cases works
> fine, but when the execution come close to the end it fails with the below
> error.
> I have checked the target generated serenity report and it looks fine. But
> the maven execution fail.
> *Config pom.xml:*
>
> {code:java}
> <plugin>
> <artifactId>maven-failsafe-plugin</artifactId>
> <version>${maven.surefire.version}</version>
> <configuration>
> <includes>
> <include>**/*Test.java</include>
>
> <include>**/*TestSuite*.java</include>
> <include>**/Test*.java</include>
> <include>**/When*.java</include>
> </includes>
> <parallel>classes</parallel>
>
> <threadCount>${parallel.tests}</threadCount>
> <forkCount>${parallel.tests}</forkCount>
> <argLine>-Xmx2048m -Xms1024m</argLine>
> </configuration>
> <executions>
> <execution>
> <id>integration-test</id>
> <phase>test</phase>
> <goals>
>
> <goal>integration-test</goal>
> </goals>
> </execution>
> <execution>
> <id>verify</id>
> <phase>verify</phase>
> <goals>
> <goal>verify</goal>
> </goals>
> </execution>
> </executions>
> </plugin>
> {code}
>
> *Error:*
>
> {code:java}
> [ERROR] Failed to execute goal
> org.apache.maven.plugins:maven-failsafe-plugin:2.22.0:verify (verify) on
> project ngsdf-at-ap: There are test failures. [ERROR] [ERROR] Please refer
> to ~\target\failsafe-reports for the individual test results. [ERROR] Please
> refer to dump files (if any exist) [date]-jvmRun[N].dump, [date].dumpstream
> and [date]-jvmRun[N].dumpstream. [ERROR]
> org.apache.maven.surefire.booter.SurefireBooterForkException:
> ExecutionException There was an error in the forked process [ERROR] Test
> mechanism :: null [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.awaitResultsDone(ForkStarter.java:494)
> [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.runSuitesForkOnceMultiple(ForkStarter.java:368)
> [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:292)
> [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:245)
> [ERROR] at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1194)
> [ERROR] at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:1022)
> [ERROR] at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:868)
> [ERROR] at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
> [ERROR] at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
> [ERROR] at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
> [ERROR] at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
> [ERROR] at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
> [ERROR] at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
> [ERROR] at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
> [ERROR] at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
> [ERROR] at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
> [ERROR] at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
> [ERROR] at org.apache.maven.cli.MavenCli.execute(MavenCli.java:954) [ERROR]
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288) [ERROR] at
> org.apache.maven.cli.MavenCli.main(MavenCli.java:192) [ERROR] at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native
> Method) [ERROR] at
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> [ERROR] at
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> [ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:567)
> [ERROR] at
> org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
> [ERROR] at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> [ERROR] at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> [ERROR] at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
> [ERROR] Caused by:
> org.apache.maven.surefire.booter.SurefireBooterForkException: There was an
> error in the forked process [ERROR] Test mechanism :: null [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:658)
> [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
> [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.access$600(ForkStarter.java:115)
> [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter$1.call(ForkStarter.java:362)
> [ERROR] at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter$1.call(ForkStarter.java:342)
> [ERROR] at
> java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264) [ERROR] at
> java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
> [ERROR] at
> java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
> [ERROR] at java.base/java.lang.Thread.run(Thread.java:835) [ERROR] -> [Help
> 1]{code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)