maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tibor Digana (JIRA)" <j...@apache.org>
Subject [jira] [Closed] (SUREFIRE-1382) OutOfMemoryError occurs when JUnit 5 test fails
Date Thu, 15 Jun 2017 11:08:00 GMT

     [ https://issues.apache.org/jira/browse/SUREFIRE-1382?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Tibor Digana closed SUREFIRE-1382.
----------------------------------
    Resolution: Fixed

https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=commit;h=7176d3c17b438c60e48a525ef96e6812f00bec46

> OutOfMemoryError occurs when JUnit 5 test fails
> -----------------------------------------------
>
>                 Key: SUREFIRE-1382
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1382
>             Project: Maven Surefire
>          Issue Type: Bug
>    Affects Versions: 2.20
>         Environment: Apache Maven 3.3.9 (bb52d8502b132ec0a5a3f4c09453c07478323dc5; 2015-11-10T17:41:47+01:00)
> Maven home: C:\prg\apache-maven-3.3.9\bin\..
> Java version: 1.8.0_102, vendor: Oracle Corporation
> Java home: C:\Program Files\Java\jdk1.8.0_102\jre
> Default locale: en_US, platform encoding: Cp1251
> OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"
>            Reporter: Oleksij Lupandin
>            Assignee: Tibor Digana
>             Fix For: 2.20.1
>
>
> h4. Steps to reproduce
> # Check out project "maven-surefire2_20-junit5" from https://wissenstein@gitlab.com/wissenstein/maven-surefire2_20-junit5.git.
> # Go to the project root (where pom.xml is).
> # Run the following command: {code}mvn -Psurefire2_19_1 clean test{code}
> The project is tested using Surefire Maven plugin version 2.19.1. At the end of the output
you can see: {code}-------------------------------------------------------
>  T E S T S
> -------------------------------------------------------
> Running com.wissenstein.mavensurefirejunit.SimplisticTest
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.073 sec <<<
FAILURE! - in com.wissenstein.mavensurefirejunit.SimplisticTest
> shouldDeliberatelyFail()  Time elapsed: 0.021 sec  <<< FAILURE!
> org.opentest4j.AssertionFailedError: Test deliberately failed
>         at com.wissenstein.mavensurefirejunit.SimplisticTest.shouldDeliberatelyFail(SimplisticTest.java:11)
> Results :
> Failed tests:
>   SimplisticTest.shouldDeliberatelyFail:11 Test deliberately failed
> Tests run: 1, Failures: 1, Errors: 0, Skipped: 0
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 4.583 s
> [INFO] Finished at: 2017-06-06T16:57:35+02:00
> [INFO] Final Memory: 16M/264M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test
(default-test) on project maven-surefire2_20-junit5: There are test failures.
> [ERROR]
> [ERROR] Please refer to C:\projects\surefire\maven-surefire2_20-junit5\target\surefire-reports
for the individual test results.
> [ERROR] -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the
following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException{code}
> # Run the following command: {code}mvn -Psurefire2_20 clean test{code}
> The project is tested using Surefire Maven plugin version 2.20.
> h4. Actual result
> At the end of the output you can see: {code}[INFO] -------------------------------------------------------
> [INFO]  T E S T S
> [INFO] -------------------------------------------------------
> [INFO] Running com.wissenstein.mavensurefirejunit.SimplisticTest
> [INFO]
> [INFO] Results:
> [INFO]
> [INFO] Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
> [INFO]
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 6.061 s
> [INFO] Finished at: 2017-06-06T17:03:52+02:00
> [INFO] Final Memory: 17M/3028M
> [INFO] ------------------------------------------------------------------------
> [ERROR] Java heap space -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please read the
following articles:
> [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/OutOfMemoryError{code}
> The stack trace is as follows: {code}java.lang.OutOfMemoryError: Java heap space
>         at java.util.Arrays.copyOf(Arrays.java:3332)
>         at java.lang.AbstractStringBuilder.ensureCapacityInternal(AbstractStringBuilder.java:124)
>         at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:448)
>         at java.lang.StringBuilder.append(StringBuilder.java:136)
>         at org.apache.maven.plugin.surefire.booterclient.output.MultipleFailureException.getLocalizedMessage(MultipleFailureException.java:52)
>         at org.apache.maven.plugin.surefire.booterclient.ForkStarter$CloseableCloser.run(ForkStarter.java:200)
>         at org.apache.maven.surefire.shade.org.apache.maven.shared.utils.cli.CommandLineUtils$1.call(CommandLineUtils.java:282)
>         at org.apache.maven.plugin.surefire.booterclient.ForkStarter.fork(ForkStarter.java:626)
>         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){code}
> h4. Expected result
> At the end of the output you should see lines similar to the output in step 3.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message