You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Steve Loughran <st...@apache.org> on 2009/08/04 11:56:33 UTC
Re: Why does Junit Task buffers all logs
Mel T wrote:
>
> When running a JUnit task, all logs are accumulated in a
> ByteArrayOutputStream.
>
> This can consume a lot of memory if running in debug and some libraries make
> excessive use of debug logging (such as DBUnit).
>
> Why does the JUnit task do that?
It isnt junit so much as the junit loggers, I think, especially the XML
one, which buffers everything and builds up a DOM, sticking some answers
in at the top.
It is flawed, you can OOM if you log too much -and there are other limits
1. if the JVM crashes, no log is kept
2. logger output is turned to ascii, the different log levels and
timestamps arent retained at the XML level for further presentation
3. you don't get any output as you go along
4. the XSL transform gets very slow on big test runs
5. the report doesn't scale to test results from >1 machine
I have played with alternate XHTML output instead, streaming and
flushing as you go
http://video.google.com/videoplay?docid=-4478242864801668108
* the original XHTML I generate is pretty ugly, you need to do some XSL
to improve
* no downstream tools (e.g. CI servers) can handle it without XSL
* now that I'm doing lots of Hadoop-style datamining, I'm not sure that
XML is the right format; its painful to split up and process in chunks
If you want to improve what we have, I'd welcome it. Something
streamable that can be turned back into "classic" XML, yet also
scaleable in capture and presentation.
-steve
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org