Kurt Deschler has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/21598 )

Change subject: IMPALA-13214: Skip wait_until_connected when shell exits
......................................................................

IMPALA-13214: Skip wait_until_connected when shell exits

The ImpalaShell class expects to start impala-shell and interact with it
by sending instructions over stdin and reading the results. This
assumption was incorrect when used for impala-shell batch sessions,
where the process exits on its own. If there's a delay in
ImpalaShell.__init__ - between starting the process and polling to see
that it's running - for a batch process, ImpalaShell will fail the
assertion that process_status is None. This can be easily reproduced by
adding a small (0.1s) sleep after starting the new process.

Most batch runs of impala-shell happen through `run_impala_shell_cmd`.
Updated that function to only wait for a successful connection when
stdin input is supplied. Otherwise the command is assumed to be a batch
function and any failures will be detected during `get_result`. Removed
explicit use of `wait_until_connected` as redundant.

Fixed cases in test_config_file that previously ignored WARNING before
the connection string because they did not specify
`wait_until_connected`.

Tested by running shell/test_shell_commandline.py with a 0.1s delay
before ImpalaShell polls.

Change-Id: I24e029b6192a17773760cb44fd7a4f87b71c0aae
Reviewed-on: http://gerrit.cloudera.org:8080/21598
Tested-by: Impala Public Jenkins <[email protected]>
Reviewed-by: Jason Fehr <[email protected]>
Reviewed-by: Kurt Deschler <[email protected]>
---
M tests/custom_cluster/test_client_ssl.py
M tests/shell/test_shell_commandline.py
M tests/shell/util.py
3 files changed, 30 insertions(+), 25 deletions(-)

Approvals:
  Impala Public Jenkins: Verified
  Jason Fehr: Looks good to me, but someone else must approve
  Kurt Deschler: Looks good to me, approved

--
To view, visit http://gerrit.cloudera.org:8080/21598
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I24e029b6192a17773760cb44fd7a4f87b71c0aae
Gerrit-Change-Number: 21598
Gerrit-PatchSet: 5
Gerrit-Owner: Michael Smith <[email protected]>
Gerrit-Reviewer: Impala Public Jenkins <[email protected]>
Gerrit-Reviewer: Jason Fehr <[email protected]>
Gerrit-Reviewer: Joe McDonnell <[email protected]>
Gerrit-Reviewer: Kurt Deschler <[email protected]>
Gerrit-Reviewer: Laszlo Gaal <[email protected]>
Gerrit-Reviewer: Michael Smith <[email protected]>

Reply via email to