GitHub user coderunner opened a pull request:
https://github.com/apache/maven-surefire/pull/109
Start stream capture before loading tests
If, when `scanClassPath()` runs, a class is loaded and that loading process
produces a log (via log4j in our case), the logging framework creates its
console appender around the current `stdout` stream, before the stream is
replaced to start the redirection of `stdout` and `stderr` to a file (when
`redirectTestOutputToFile` is used). The consequences are that `stdout` gets
flooded with logs (i.e. `redirectTestOutputToFile` doesn't work).
Scanning the classpath after the capture is started, fixed the issue.
I believe that other providers have the same issue.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/coderunner/maven-surefire fix-redirect-to-file
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/maven-surefire/pull/109.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #109
----
commit cdbf28ea38ee77b84877e2549ed53230d98ed3ea
Author: Felix Trepanier <[email protected]>
Date: 2015-12-08T20:53:51Z
Start stream capture before loading tests
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]