Fix DieWithDignity test when waiting on jps backport(#43861) (#43871)

the test often hangs on executing jps command
we don't need to wait for this command to finish.

closes #43413
This commit is contained in:
Przemyslaw Gomulka 2019-07-03 20:39:48 +02:00 committed by GitHub
parent 680edbe3f1
commit 553f783e73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,7 +34,6 @@ import java.util.Iterator;
import java.util.List;
import static org.hamcrest.Matchers.containsString;
import static org.hamcrest.Matchers.equalTo;
import static org.hamcrest.Matchers.not;
public class DieWithDignityIT extends ESRestTestCase {
@ -49,7 +48,6 @@ public class DieWithDignityIT extends ESRestTestCase {
assertBusy(() -> {
final String jpsPath = PathUtils.get(System.getProperty("runtime.java.home"), "bin/jps").toString();
final Process process = new ProcessBuilder().command(jpsPath, "-v").start();
assertThat(process.waitFor(), equalTo(0));
try (InputStream is = process.getInputStream();
BufferedReader in = new BufferedReader(new InputStreamReader(is, "UTF-8"))) {