Files
impala/shell/ImpalaHttpClient.py
Joe McDonnell 0ee5f8084f IMPALA-11317/IMPALA-11316/IMPALA-11315: impala-shell Python 3 fixes
This fixes a few impala-shell Python 3 issues:
1. In ImpalaShell's do_history(), the decode() call needs to be
   avoided in Python 3, because in Python 3 the cmd is already
   a string and doesn't need further decoding. (IMPALA-11315)
2. TestImpalaShell.test_http_socket_timeout() gets a different
   error message in Python 3. It throws the "BlockingIOError"
   rather than "socker.error". (IMPALA-11316)
3. ImpalaHttpClient.py's code to retrieve the body when
   handling an HTTP error needs to have a decode() call
   for the body. Otherwise, the body remains bytes and
   causes TestImpalaShellInteractive.test_http_interactions_extra()
   to fail. (IMPALA-11317)

Testing:
 - Ran shell tests in the standard way
 - Ran shell tests with the impala-shell executable coming from
   a Python 3 virtualenv using the PyPi package

Change-Id: Ie58380a17d7e011f4ce96b27d34717509a0b80a6
Reviewed-on: http://gerrit.cloudera.org:8080/18556
Reviewed-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
Reviewed-by: Wenzhe Zhou <wzhou@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
2022-05-25 22:47:40 +00:00

15 KiB