Joe McDonnell created IMPALA-9157:
-------------------------------------

             Summary: TestAuthorizationProvider.test_invalid_provider_flag uses 
Python 2.6 incompatible code
                 Key: IMPALA-9157
                 URL: https://issues.apache.org/jira/browse/IMPALA-9157
             Project: IMPALA
          Issue Type: Bug
          Components: Infrastructure
    Affects Versions: Impala 3.4.0
            Reporter: Joe McDonnell
            Assignee: David Knupp


Our Centos 6 builds use Python 2.6, which means that it doesn't have 
check_output (added in Python 2.7). This causes test failures in 
test_provider.py:

 
{noformat}
authorization/test_provider.py:70: in setup_method
    self.pre_test_cores = set([f for f in possible_cores if is_core_dump(f)])
../lib/python/impala_py_lib/helpers.py:64: in is_core_dump
    file_std_out = exec_local_command("file %s" % file_path)
../lib/python/impala_py_lib/helpers.py:34: in exec_local_command
    return subprocess.check_output(cmd.split())
E   AttributeError: 'module' object has no attribute 'check_output'{noformat}
This comes from the new code to handle intentional core dumps:

 

[https://github.com/apache/impala/blob/master/lib/python/impala_py_lib/helpers.py#L34]
{noformat}
def exec_local_command(cmd):
  """  Executes a command for the local bash shell and return stdout as a 
string.

  Args:
    cmd: command as a string

  Return:
    STDOUT
  """
  return subprocess.check_output(cmd.split()){noformat}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to