maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Emilian Bold (JIRA)" <>
Subject [jira] Created: (SUREFIRE-581) ReporterManager causes OutOfMemoryException
Date Wed, 11 Nov 2009 09:14:55 GMT
ReporterManager causes OutOfMemoryException

                 Key: SUREFIRE-581
             Project: Maven Surefire
          Issue Type: Bug
          Components: plugin
    Affects Versions: 2.4.3
         Environment: Linux,JDK, 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

Specifically, the 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: 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:
For more information on JIRA, see:


View raw message