Correctly restore stdout after tests
We have many tests that overwrite stdout with a custom output stream and we call System.setOut(null) to attempt to restore stdout.
We need to either:
- capture the original
System.outand restore that same instance - use
StdOutCaptureRuleprovided bycom.google.cloud:google-cloud-core'stestsclassifier (jar)
@chingor13, thank you for pointing this out. Here is the fix for this issue just in case somebody needs a reference.
Closing this issue. It's used for reference in fixing this specific problem.
I think there are a few other samples that still do this incorrectly, so I'm going to reopen so we don't forget about it.
The next release of shared-config will have the rule setup.
I'm going to close this, and we'll deal with individual issues and PR's for any of these we find.