You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Maarten Mulders (Jira)" <ji...@apache.org> on 2022/10/28 08:57:00 UTC
[jira] [Assigned] (SUREFIRE-1887) Test Failures should not dump stack.
[ https://issues.apache.org/jira/browse/SUREFIRE-1887?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Maarten Mulders reassigned SUREFIRE-1887:
-----------------------------------------
Assignee: Maarten Mulders
> Test Failures should not dump stack.
> -------------------------------------
>
> Key: SUREFIRE-1887
> URL: https://issues.apache.org/jira/browse/SUREFIRE-1887
> Project: Maven Surefire
> Issue Type: Bug
> Reporter: Elliotte Rusty Harold
> Assignee: Maarten Mulders
> Priority: Major
>
> Typical failing test output from the Maven surefire plugin dumps a lot of internal state. This is incorrect.
>
> The purpose of the surefire plugin is to run the user's tests. These tests are expected to fail much of the time. This a normal state. The test failure should be reported, but this is in no way a failure of surefire itself. There is no reason surefire should print its own stack. Indeed, this simply obscures the real failure in the user's own code.
>
> ```
> org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project dependencies: There are test failures.
> Please refer to /home/runner/work/cloud-opensource-java/cloud-opensource-java/dependencies/target/surefire-reports for the individual test results.
> Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:215)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:156)
> at org.apache.maven.lifecycle.internal.MojoExecutor.execute (MojoExecutor.java:148)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:117)
> at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject (LifecycleModuleBuilder.java:81)
> at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build (SingleThreadedBuilder.java:56)
> at org.apache.maven.lifecycle.internal.LifecycleStarter.execute (LifecycleStarter.java:128)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:305)
> at org.apache.maven.DefaultMaven.doExecute (DefaultMaven.java:192)
> at org.apache.maven.DefaultMaven.execute (DefaultMaven.java:105)
> at org.apache.maven.cli.MavenCli.execute (MavenCli.java:956)
> at org.apache.maven.cli.MavenCli.doMain (MavenCli.java:288)
> at org.apache.maven.cli.MavenCli.main (MavenCli.java:192)
> 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)
> 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.apache.maven.wrapper.BootstrapMainStarter.start (BootstrapMainStarter.java:39)
> at org.apache.maven.wrapper.WrapperExecutor.execute (WrapperExecutor.java:122)
> at org.apache.maven.wrapper.MavenWrapperMain.main (MavenWrapperMain.java:61)
> Caused by: org.apache.maven.plugin.MojoFailureException: There are test failures.
> ```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)