Skip to content

Commit

Permalink
Remove flakey StreamingPythonExecutor test. (#5097)
Browse files Browse the repository at this point in the history
* Removing a test that has a difficult to solve race condition that would fail unpredictably
* fixes #5065
  • Loading branch information
cmnbroad authored and lbergelson committed Aug 16, 2018
1 parent b8bbb9c commit df3fb9d
Showing 1 changed file with 0 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,29 +71,6 @@ public void testExecuteCommand(final PythonScriptExecutor.PythonExecutableName e
}
}

@Test(groups = "python", dataProvider="supportedPythonVersions", dependsOnMethods = "testPythonExists")
public void testStderrOutput(final PythonScriptExecutor.PythonExecutableName executableName) {
// test write to stderr from python
final StreamingPythonScriptExecutor<String> streamingPythonExecutor =
new StreamingPythonScriptExecutor<>(executableName,true);
Assert.assertNotNull(streamingPythonExecutor);
Assert.assertTrue(streamingPythonExecutor.start(Collections.emptyList()));

try {
streamingPythonExecutor.sendSynchronousCommand("import sys" + NL);
final ProcessOutput po = streamingPythonExecutor.sendSynchronousCommand(
"sys.stderr.write('error output to stderr\\n')" + NL);

Assert.assertNotNull(po.getStderr());
Assert.assertNotNull(po.getStderr().getBufferString());
Assert.assertNotNull(po.getStderr().getBufferString().contains("error output to stderr"));
}
finally {
streamingPythonExecutor.terminate();
Assert.assertFalse(streamingPythonExecutor.getProcess().isAlive());
}
}

@Test(groups = "python", dataProvider="supportedPythonVersions", dependsOnMethods = "testPythonExists")
public void testTerminateWhilePythonBlocked(final PythonScriptExecutor.PythonExecutableName executableName) {
// Test termination on a Python process that is blocked on I/O to ensure that we don't leave
Expand Down

0 comments on commit df3fb9d

Please sign in to comment.