@@ -120,25 +120,26 @@ private WebElement getElement(By by) {
120120 private static Process startWebServer (Runfiles runfiles , int serverPort ) throws Exception {
121121 String path =
122122 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 );
124125 pb .environment ().putAll (runfiles .getEnvVars ());
125126 Process p = pb .start ();
126- waitForReadyMessage (p , "listening on" , false );
127+ waitForReadyMessage (p , "listening on" );
127128 return p ;
128129 }
129130
130131 private static Process startEnvoyProxy (Runfiles runfiles ) throws Exception {
131132 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 );
133135 pb .environment ().putAll (runfiles .getEnvVars ());
134136 Process p = pb .start ();
135- waitForReadyMessage (p , "starting main dispatch loop" , true );
137+ waitForReadyMessage (p , "starting main dispatch loop" );
136138 return p ;
137139 }
138140
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 ();
142143 InputStreamReader isr = new InputStreamReader (is );
143144 BufferedReader br = new BufferedReader (isr );
144145 String line ;
0 commit comments