@@ -120,25 +120,26 @@ private WebElement getElement(By by) {
120
120
private static Process startWebServer (Runfiles runfiles , int serverPort ) throws Exception {
121
121
String path =
122
122
runfiles .rlocation ("rules_typescript_proto/test/integration/client/prodserver.sh" );
123
- ProcessBuilder pb = new ProcessBuilder (path , "--port" , Integer .toString (serverPort ));
123
+ ProcessBuilder pb =
124
+ new ProcessBuilder (path , "--port" , Integer .toString (serverPort )).redirectErrorStream (true );
124
125
pb .environment ().putAll (runfiles .getEnvVars ());
125
126
Process p = pb .start ();
126
- waitForReadyMessage (p , "listening on" , false );
127
+ waitForReadyMessage (p , "listening on" );
127
128
return p ;
128
129
}
129
130
130
131
private static Process startEnvoyProxy (Runfiles runfiles ) throws Exception {
131
132
String path = runfiles .rlocation ("rules_typescript_proto/test/integration/envoy.yaml" );
132
- ProcessBuilder pb = new ProcessBuilder ("envoy" , "--config-path" , path );
133
+ ProcessBuilder pb =
134
+ new ProcessBuilder ("envoy" , "--config-path" , path ).redirectErrorStream (true );
133
135
pb .environment ().putAll (runfiles .getEnvVars ());
134
136
Process p = pb .start ();
135
- waitForReadyMessage (p , "starting main dispatch loop" , true );
137
+ waitForReadyMessage (p , "starting main dispatch loop" );
136
138
return p ;
137
139
}
138
140
139
- private static void waitForReadyMessage (Process p , String readyMessage , boolean readErrorStream )
140
- throws Exception {
141
- InputStream is = readErrorStream ? p .getErrorStream () : p .getInputStream ();
141
+ private static void waitForReadyMessage (Process p , String readyMessage ) throws Exception {
142
+ InputStream is = p .getInputStream ();
142
143
InputStreamReader isr = new InputStreamReader (is );
143
144
BufferedReader br = new BufferedReader (isr );
144
145
String line ;
0 commit comments