You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@impala.apache.org by "David Knupp (Jira)" <ji...@apache.org> on 2019/11/26 19:29:00 UTC

[jira] [Resolved] (IMPALA-9157) TestAuthorizationProvider.test_invalid_provider_flag fails due to Python 2.6 incompatible code

     [ https://issues.apache.org/jira/browse/IMPALA-9157?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

David Knupp resolved IMPALA-9157.
---------------------------------
    Fix Version/s: Impala 3.4.0
       Resolution: Fixed

> TestAuthorizationProvider.test_invalid_provider_flag fails due to 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
>            Priority: Blocker
>              Labels: broken-build
>             Fix For: Impala 3.4.0
>
>
> 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)