[ https://issues.apache.org/jira/browse/LUCENE-5622?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13975268#comment-13975268 ]
Dawid Weiss commented on LUCENE-5622: ------------------------------------- Sure. I would do it in a slightly different way though -- provide delegate syserr/sysout instances (which always correctly delegate to original streams), get a stack trace of the first call to any write[] methods, mark the test as a failure, but fail it inside the after method (with the captured call stack, which may be useful to debug the sysout). The reason for this is to allow the test to run normally and fail it at the end. Throwing a runtime exception from inside sysout/syserr may result in odd behavior (and may be caught, whereas my suggestion cannot be intercepted by the test code). > Fail tests if they print, and tests.verbose is not set > ------------------------------------------------------ > > Key: LUCENE-5622 > URL: https://issues.apache.org/jira/browse/LUCENE-5622 > Project: Lucene - Core > Issue Type: Bug > Reporter: Robert Muir > Attachments: LUCENE-5622.patch > > > Some tests print so much stuff they are now undebuggable (see LUCENE-5612). > I think its bad that the testrunner hides this stuff, we used to stay on top > of it. Instead, whne tests.verbose is false, we should install a printstreams > (system.out/err) that fail the test instantly because they are noisy. > This will ensure that our tests don't go out of control. -- This message was sent by Atlassian JIRA (v6.2#6252) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org