[ 
https://jira.codehaus.org/browse/SUREFIRE-938?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=315901#comment-315901
 ] 

Kristian Rosenvold commented on SUREFIRE-938:
---------------------------------------------

I'm afraid the pull request doesn't entirely do it, since most of the memory 
related issues come from the bytBuffer.toString, which is where the nasty 
memory usage lies.

The real problem is making the StatelessXmlReporter use a streaming xml api so 
it can immediately stream the stdout to file and keep stderr in a tempfile.

It should be possible to make a simple unit test for the xml reporter while 
converting it to sax (it is tested extremely well through the IT's).

If you want to have a shot at doing that, I can handle all the other changes 
that would need to be done (if you want to make it use Sax and works with a 
unit test I can fix the rest).

The pull request has no real effect, please close it.

btw; 2.13 is about 36 hours from now if you want it in there ;)
                
> out of memory when logging more messages than heap size
> -------------------------------------------------------
>
>                 Key: SUREFIRE-938
>                 URL: https://jira.codehaus.org/browse/SUREFIRE-938
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Surefire Plugin
>    Affects Versions: 2.12.4
>            Reporter: Andrew Gaul
>
> Observed OOM when logging more messages than heap size:
> Exception in thread "ThreadedStreamConsumer" java.lang.OutOfMemoryError: Java 
> heap space
>         at java.util.Arrays.copyOfRange(Arrays.java:3209)
>         at java.lang.String.<init>(String.java:215)
>         at java.lang.StringBuilder.toString(StringBuilder.java:430)
>         at 
> org.apache.maven.plugin.surefire.report.TestSetRunListener.getAsString(TestSetRunListener.java:225)
>         at 
> org.apache.maven.plugin.surefire.report.TestSetRunListener.wrap(TestSetRunListener.java:230)
>         at 
> org.apache.maven.plugin.surefire.report.TestSetRunListener.testSucceeded(TestSetRunListener.java:161)
>         at 
> org.apache.maven.plugin.surefire.booterclient.output.ForkClient.consumeLine(ForkClient.java:100)
>         at 
> org.apache.maven.plugin.surefire.booterclient.output.ThreadedStreamConsumer$Pumper.run(ThreadedStreamConsumer.java:67)
>         at java.lang.Thread.run(Thread.java:662)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to