File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
webrisk/src/test/java/webrisk Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change 4545public class SnippetsIT {
4646
4747 private static final String PROJECT_ID = System .getenv ("GOOGLE_CLOUD_PROJECT" );
48+ private static ByteArrayOutputStream originalOut = new ByteArrayOutputStream ();
49+ private static PrintStream printStream = new PrintStream (originalOut );
50+
4851 private ByteArrayOutputStream stdOut ;
4952
5053 // Check if the required environment variables are set.
@@ -56,6 +59,7 @@ public static void requireEnvVar(String envVarName) {
5659
5760 @ BeforeClass
5861 public static void setUp () throws IOException {
62+ printStream .println (System .out );
5963 requireEnvVar ("GOOGLE_APPLICATION_CREDENTIALS" );
6064 requireEnvVar ("GOOGLE_CLOUD_PROJECT" );
6165 }
@@ -68,7 +72,7 @@ public void beforeEach() {
6872
6973 @ After
7074 public void afterEach () {
71- stdOut = null ;
75+ stdOut = originalOut ;
7276 }
7377
7478 @ Test
You can’t perform that action at this time.
0 commit comments