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

run_test_case() should find/replace arbitrary strings in /testdata/workloads/*/queries/*.test

    Details

      Description

      E.g. this test in query_test/test_kudu.py...

      @pytest.mark.execute_serially
      def test_kudu_alter_table(self, vector, unique_database):
          self.run_test_case('QueryTest/kudu_alter', vector, use_db=unique_database)
      

      ...contains hardcoded values for kudu.master_addresses:

      ====
      ---- QUERY
      # Alter master address to a different location
      alter table simple set tblproperties (
        'kudu.master_addresses' = 'localhost'
      )
      ---- RESULTS
      'Updated table.'
      ---- TYPES
      STRING
      ====
      ---- QUERY
      # Show that new address is picked up
      describe formatted simple
      ---- RESULTS: VERIFY_IS_SUBSET
      '','kudu.master_addresses','localhost           '
      ---- TYPES
      STRING,STRING,STRING
      ====
      ---- QUERY
      alter table simple set tblproperties ('kudu.master_addresses' = '127.0.0.1')
      ---- RESULTS
      'Updated table.'
      ---- TYPES
      STRING
      

      There's no way currently to make this test run on remote clusters because there's no way to replace the hardcoded values.

        Activity

        Hide
        dknupp David Knupp added a comment -

        Lars Volker - Thanks for fixing this in https://gerrit.cloudera.org/#/c/6817 !

        Show
        dknupp David Knupp added a comment - Lars Volker - Thanks for fixing this in https://gerrit.cloudera.org/#/c/6817 !
        Hide
        lv Lars Volker added a comment -

        IMPALA-5287: Test skip.header.line.count on gzip

        This change fixed IMPALA-4873 by adding the capability to supply a dict
        'test_file_vars' to run_test_case(). Keys in this dict will be replaced
        with their values inside test queries before they are executed.

        Change-Id: Ie3f3c29a42501cfb2751f7ad0af166eb88f63b70
        Reviewed-on: http://gerrit.cloudera.org:8080/6817
        Reviewed-by: Michael Brown <mikeb@cloudera.com>
        Tested-by: Impala Public Jenkins

        Show
        lv Lars Volker added a comment - IMPALA-5287 : Test skip.header.line.count on gzip This change fixed IMPALA-4873 by adding the capability to supply a dict 'test_file_vars' to run_test_case(). Keys in this dict will be replaced with their values inside test queries before they are executed. Change-Id: Ie3f3c29a42501cfb2751f7ad0af166eb88f63b70 Reviewed-on: http://gerrit.cloudera.org:8080/6817 Reviewed-by: Michael Brown <mikeb@cloudera.com> Tested-by: Impala Public Jenkins

          People

          • Assignee:
            lv Lars Volker
            Reporter:
            dknupp David Knupp
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development