Timeout on waiting for server thread to die in Py console tests added

The timeout added to avoid hanging of Python console tests.
This commit is contained in:
Alexander Koshevoy
2017-10-12 19:51:15 +03:00
parent f8d4504e5e
commit 6022f0804d
@@ -45,10 +45,7 @@ import org.junit.Assert;
import java.util.List;
import java.util.Set;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.Future;
import java.util.concurrent.Semaphore;
import java.util.concurrent.*;
/**
* @author traff
@@ -113,8 +110,8 @@ public class PyConsoleTask extends PyExecutionFixtureTestTask {
/**
* Disposes Python console and waits for Python console server thread to die.
*/
private void disposeConsole() throws InterruptedException, ExecutionException {
disposeConsoleAsync().get();
private void disposeConsole() throws InterruptedException, ExecutionException, TimeoutException {
disposeConsoleAsync().get(30L, TimeUnit.SECONDS);
}
@NotNull