mirror of
https://github.com/apache/impala.git
synced 2025-12-30 12:02:10 -05:00
test_shell_commandline.py::TestImpalaShell::test_socket_opening uses netcat to listen to an ephemeral port to verify the expected socket opening behavior of impala-shell. This port number is fixed to 42000. When this port happens to be used by another outbound socket, this test will fail. This change refactors the test to use socket.bind(). The port used in this test is no longer fixed and will be picked automatically. This change also adds the proper cleanup logics to the various subprocess.Popen objects used in the test. Change-Id: Idd64632ded936d49fc404bcac75588dd7886be44 Reviewed-on: http://gerrit.cloudera.org:8080/10747 Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com> Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>