Re: [DISCUSS] test code style (particularly logging)

2018-09-21 Thread Kirk Lund
I would probably lean towards using System.out.println in a non-end-to-end test and using Logger in an end-to-end test that's already using our logging system. My only argument against using System.out.println in an end-to-end test is that it can easily get lost or incorrectly interleaved in the

Re: [DISCUSS] test code style (particularly logging)

2018-09-21 Thread Dale Emery
In general I agree. I’m an author of the PR that triggered this thread. That PR specifically prints new information to help diagnose an intermittent CI failure in a DistributedTest test, which we have been unable to reproduce outside of CI. Our working hypothesis is that an action initiated at

Re: [DISCUSS] test code style (particularly logging)

2018-09-21 Thread Jacob Barrett
Exactly what Kirk said! > On Sep 21, 2018, at 10:34 AM, Kirk Lund wrote: > > Most of these logWriter or logger usages are in larger end-to-end tests > that were written before we could using IDE debuggers on our tests. With a > debugger, I don't want to see more output from the test so I tend

Re: [DISCUSS] test code style (particularly logging)

2018-09-21 Thread Kirk Lund
Most of these logWriter or logger usages are in larger end-to-end tests that were written before we could using IDE debuggers on our tests. With a debugger, I don't want to see more output from the test so I tend to delete all such System.out.printlns or LogWriter/Logger usage. My recommendation

Re: [DISCUSS] test code style (particularly logging)

2018-09-20 Thread Darrel Schneider
For simple single threaded tests System.out would do the job. For a multi-threaded test I have found the logging framework to be helpful because of the thread id and the timestamps. On Thu, Sep 20, 2018 at 1:50 PM Dale Emery wrote: > As long as the stdout is available in the test results, I’m

Re: [DISCUSS] test code style (particularly logging)

2018-09-20 Thread Dale Emery
As long as the stdout is available in the test results, I’m more than happy to avoid coupling the tests to the product logging code. > On Sep 20, 2018, at 1:39 PM, Galen O'Sullivan wrote: > > I was reviewing a PR recently and noticed that we have some test code that > uses Logger (or

[DISCUSS] test code style (particularly logging)

2018-09-20 Thread Galen O'Sullivan
I was reviewing a PR recently and noticed that we have some test code that uses Logger (or LogWriter). If I understand correctly, anything logged to stdout will be included in the test output, and anything logged in a DUnit VM will be logged with the appropriate VM number prepended in the output.