This is an automated email from the ASF dual-hosted git repository.

tarmstrong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git


The following commit(s) were added to refs/heads/master by this push:
     new 0364e5f  IMPALA-8859: fix test_global_config_file for remote clusters
0364e5f is described below

commit 0364e5f8d4195210bf5eb0a6b5145b9f9940d2b5
Author: Tim Armstrong <tarmstr...@cloudera.com>
AuthorDate: Mon Aug 12 20:30:56 2019 -0700

    IMPALA-8859: fix test_global_config_file for remote clusters
    
    I think the bug is that necessary environment variables were
    not passed in - the environment was clobbered instead of
    just having the necessary variable added.
    
    Change-Id: I448e5a7dfc0ab6fd53182a593e2fff1a12a10fd7
    Reviewed-on: http://gerrit.cloudera.org:8080/14053
    Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
    Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
---
 tests/shell/test_shell_commandline.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/tests/shell/test_shell_commandline.py 
b/tests/shell/test_shell_commandline.py
index b6df53e..718d934 100644
--- a/tests/shell/test_shell_commandline.py
+++ b/tests/shell/test_shell_commandline.py
@@ -489,8 +489,9 @@ class TestImpalaShell(ImpalaTestSuite):
     """Test global and user configuration files."""
     args = []
     # shell uses shell options in global config
-    env = {
-      ImpalaShellClass.GLOBAL_CONFIG_FILE: 
'{0}/good_impalarc2'.format(QUERY_FILE_PATH)}
+    env = dict(os.environ)
+    env[ImpalaShellClass.GLOBAL_CONFIG_FILE] = '{0}/good_impalarc2'.format(
+        QUERY_FILE_PATH)
     result = run_impala_shell_cmd(vector, args, env=env)
     assert 'WARNING:' not in result.stderr, \
       "A valid config file should not trigger any warning: 
{0}".format(result.stderr)

Reply via email to