mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
Adding timeout for py4j gateway to have time to shutdown
This commit is contained in:
parent
3529fe5ee6
commit
1be77325bf
1 changed files with 2 additions and 1 deletions
|
|
@ -114,7 +114,7 @@ public class PythonInterpreterTest {
|
|||
* is sent to interpreter and JavaGateway is running
|
||||
*/
|
||||
@Test
|
||||
public void testPy4jInstalled() throws IOException {
|
||||
public void testPy4jInstalled() throws IOException, InterruptedException {
|
||||
when(mockPythonProcess.sendAndGetResult(eq("\n\nimport py4j\n"))).thenReturn(">>>");
|
||||
|
||||
pythonInterpreter.open();
|
||||
|
|
@ -130,6 +130,7 @@ public class PythonInterpreterTest {
|
|||
|
||||
assertTrue(serverIsListeningOn(py4jPort));
|
||||
pythonInterpreter.close();
|
||||
TimeUnit.SECONDS.sleep(1);
|
||||
assertFalse(serverIsListeningOn(py4jPort));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue