You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kristian Rosenvold (JIRA)" <ji...@codehaus.org> on 2010/12/13 22:33:59 UTC

[jira] Closed: (SUREFIRE-581) ReporterManager causes OutOfMemoryException

     [ http://jira.codehaus.org/browse/SUREFIRE-581?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kristian Rosenvold closed SUREFIRE-581.
---------------------------------------

    Resolution: Duplicate

> ReporterManager causes OutOfMemoryException
> -------------------------------------------
>
>                 Key: SUREFIRE-581
>                 URL: http://jira.codehaus.org/browse/SUREFIRE-581
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.4.3
>         Environment: Linux,JDK 1.6.0.07, surefire 2.4.2
> OSX, JSK 1.5/1.5, surefire 2.4.2, 2.4.3
>            Reporter: Emilian Bold
>            Priority: Critical
>
> I have some unit tests that indirectly generate a lot of output to stdout/stderr. What I have been noticing on the build server is that a lot of these tests die with OutOfMemory errors.
> After profiling the testcase locally, it seems the cause isn't my own code, but the Maven runtime.
> Specifically, the org.apache.maven.surefire.report.ReporterManager class seems to like holding the entire output *in RAM* via the variables:
> private ByteArrayOutputStream stdOut;
> private ByteArrayOutputStream stdErr; 
> The actual contents of these seem to be disregarded unless the test is failed, at which point you need the entire string, again, in RAM.
> I wanted to provide a patch for this but I couldn't find a nice one as the design is a big unfortunate: org.apache.maven.surefire.report.Reporter expects a String for stdout/stderr -- perhaps a CharSequence would be nicer and we could have an adapter over a temporary file insted of a ByteArrayOutputStream.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira