Re: Using SystemOutRule or SystemErrRule in Geode tests

2018-11-26 Thread Kirk Lund
The following unit test will pass repeatedly in both your IDE (ex: run until failure) or in stressNewTest: public class SystemOutRuleTest { @Rule public SystemOutRule systemOutRule = new SystemOutRule().enableLog(); @Test public void passesRepeatedly() { System.out.println("hello");

Using SystemOutRule or SystemErrRule in Geode tests

2018-11-26 Thread Kirk Lund
Log4J and Logback both capture a reference to System.out and/or System.err and then use that reference thereafter. This means that any manipulation of System.out or System.err -- using System.setOut(PrintStream) or System.setErr(PrintStream) -- probably isn't going to play nicely with logging in ge