[
https://issues.apache.org/jira/browse/SUREFIRE-1426?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17498518#comment-17498518
]
Olivier Lamy commented on SUREFIRE-1426:
----------------------------------------
[~tibordigana] you are doing a lot of confusions here.... This has nothing to
do with ASF build or forkcount or whatever....
It's an old issue which still exists.
look at the branch surefire-wrong-arg of
[https://github.com/apache/maven-surefire/]
now run (jdk 1.8 or 11 whatever)
mvn clean install -Dmaven.test.failure.ignore=true
there is a build success at the end. This is what users do not consider normal!
If they were using option such -fae why not this would make sense, but here
surefire cannot even start to run test.
As far I can read from the documentation here
([https://maven.apache.org/surefire/maven-surefire-plugin/test-mojo.html#testFailureIgnore)]
{quote}Set this to "true" to ignore a failure during testing.
{quote}
but here testing phase has not runned and not even started because of a wrong
configuration.
My example fail from all modules but imagine build with 60 modules and only one
module failing. Nobody will see it.
For a similar situation (wrong jvm arg configuration) the compiler plugin
fails directly (see branch compiler-wrong-arg of surefire) and do not go to the
end saying build success.
I hope with such explanation you will have a better understanding of the
problem and agree this should be fixed.
> Fork crash doesn't fail build with -Dmaven.test.failure.ignore=true
> -------------------------------------------------------------------
>
> Key: SUREFIRE-1426
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1426
> Project: Maven Surefire
> Issue Type: Bug
> Components: process forking
> Reporter: Dan Berindei
> Assignee: Tibor Digana
> Priority: Major
> Attachments: surefire-1426-test.tar.gz
>
>
> We have a reactor with many modules, and also a few random test failures. We
> want to run the tests of all the modules even if a test failed in the core
> module, so we use {{mvn -Dmaven.test.failure.ignore=true}}. {{mvn
> --fail-at-end}} only builds the modules that do not depend on the module with
> a failed test.
> The problem is that fork crashes like this one are written to the surefire
> reports, so Jenkins ignores them:
> {noformat}
> org.apache.maven.surefire.booter.SurefireBooterForkException: There was an
> error in the forked process
> Unable to load category: stress
> at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:665)
> at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:533)
> at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:279)
> at
> org.apache.maven.plugin.surefire.booterclient.ForkStarter.run(ForkStarter.java:243)
> at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeProvider(AbstractSurefireMojo.java:1077)
> at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.executeAfterPreconditionsChecked(AbstractSurefireMojo.java:907)
> at
> org.apache.maven.plugin.surefire.AbstractSurefireMojo.execute(AbstractSurefireMojo.java:785)
> at
> org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
> at
> org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:207)
> 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:116)
> at
> org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
> at
> org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
> at
> org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
> at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
> at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
> at org.apache.maven.cli.MavenCli.execute(MavenCli.java:863)
> at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main(MavenCli.java:199)
> 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:289)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
> at
> org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356){noformat}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)