IMPALA-11251: Fix TestImpalaShellInteractive.test_unicode_input on Ubuntu 20

TestImpalaShellInteractive.test_unicode_input() was spawning
impala-shell using a command that preserves the environment. This
is a problem on Ubuntu 20, because Ubuntu 20 uses a newer GCC/libstdc++.
Preserving the environment keeps an LD_LIBRARY_PATH setting that
uses an older libstdc++ and causes the shell to fail at startup.

This switches the test to use shell/util.py's spawn_shell(),
which cleans up the environment before running the shell.

Testing:
 - Ran tests on Ubuntu 20

Change-Id: Ib07f557ab3c21d6b39f814dcfc0bf9eb1b61f090
Reviewed-on: http://gerrit.cloudera.org:8080/18558
Reviewed-by: Joe McDonnell <joemcdonnell@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenkins@cloudera.com>
This commit is contained in:
Joe McDonnell
2022-05-21 19:28:10 -07:00
committed by Impala Public Jenkins
parent 0ee5f8084f
commit f77f577074

View File

@@ -373,7 +373,7 @@ class TestImpalaShellInteractive(ImpalaTestSuite):
# IMPALA-10415: Multiline query with history enabled and unicode chars.
# readline gets its input from tty, so using stdin does not work.
shell_cmd = get_shell_cmd(vector)
child_proc = pexpect.spawn(shell_cmd[0], shell_cmd[1:])
child_proc = spawn_shell(shell_cmd)
child_proc.expect(PROMPT_REGEX)
child_proc.sendline("select '{0}'\n;".format(unicode_bytes))
child_proc.expect("Fetched 1 row\(s\) in [0-9]+\.?[0-9]*s")