(Moved this to mailing list)

redirectTestOutputToFile spools directly to disk and is unchanged. This is
actually the stdio capture for the xml-report files, which
used to be in-memory, so it was limited to memory size. (the problem being
that we can't really write the xml file as-we-go due to them being xml,
the redirectTestOutputToFile output can be written immediately since it's
plain text)

With the new solution, it keeps stuff in-memory until a single test writes
more than 1MB to stdout or sterr, in which case the output stream switches
to a tempfile (using DeferredFileOutputStream from commons io). In the main
fix for this issue (a few commits earlier), I put this stuff in
target/<tempfile>. Then I sort-of decided that tmpdir was better, since
it's just an intermediate before writing the XML report file, the tmpfile
should just be deleted at the end.

So we do not actually /move/ the file but we use it to generate the
TEST-*.xml files. I did not actually check if DeferredFileOutputStream adds
delete on shutdown to the tmpfile, which I suppose I should check !

Kristian


2013/5/4 Mirko Friedenhagen <mfriedenha...@gmail.com>

> Hello Kristian,
>
> see:
> https://git-wip-us.apache.org/repos/asf?p=maven-surefire.git;a=commitdiff;h=268f3be4f0d21a725d5745fe74e354c7f04861ff
>
> Has this something to do with redirectTestOutputToFile? When capturing
> stdout and stderr in java.io.tmpdir, moving the final result could
> mean moving between partitions. We had some problems with testdata not
> properly cleaned up by Jenkins Jobs in the past and having everything
> beneath target seemed like a good idea to me :-).
>
> Regards Mirko
> --
> http://illegalstateexception.blogspot.com/
> https://github.com/mfriedenhagen/
> https://bitbucket.org/mfriedenhagen/
>

Reply via email to