Uploaded image for project: 'IMPALA'
  1. IMPALA
  2. IMPALA-9157

TestAuthorizationProvider.test_invalid_provider_flag fails due to Python 2.6 incompatible code

    XMLWordPrintableJSON

Details

    • ghx-label-14

    Description

      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:

       

      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'

      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

      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())

      Attachments

        Activity

          People

            dknupp David Knupp
            joemcdonnell Joe McDonnell
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: