File tree 1 file changed +3
-5
lines changed
webrisk/src/test/java/webrisk 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change 45
45
public class SnippetsIT {
46
46
47
47
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 );
48
+ private final PrintStream originalOut = System .out ;
50
49
51
50
private ByteArrayOutputStream stdOut ;
52
51
@@ -59,7 +58,6 @@ public static void requireEnvVar(String envVarName) {
59
58
60
59
@ BeforeClass
61
60
public static void setUp () throws IOException {
62
- printStream .println (System .out );
63
61
requireEnvVar ("GOOGLE_APPLICATION_CREDENTIALS" );
64
62
requireEnvVar ("GOOGLE_CLOUD_PROJECT" );
65
63
}
@@ -72,8 +70,8 @@ public void beforeEach() {
72
70
73
71
@ After
74
72
public void afterEach () {
75
- stdOut = originalOut ;
76
- System .setOut (new PrintStream ( originalOut ) );
73
+ stdOut . reset () ;
74
+ System .setOut (originalOut );
77
75
}
78
76
79
77
@ Test
You can’t perform that action at this time.
0 commit comments