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

qgen: cluster unit tests are bitrotted

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: Impala 2.7.0
    • Fix Version/s: Impala 2.8.0
    • Component/s: Infrastructure
    • Labels:
      None

      Description

      It's not in the scope of this bug to add more tests; instead it's to get tests in working order. So:

      1. Fix the bitrotted test
      2. Move the tests into the tests-for-qgen directory
      mikeb@mikeb-desktop:1:~/Impala/tests/comparison (asf-master) $ impala-py.test cluster_tests.py
      ============================= test session starts ==============================
      platform linux2 -- Python 2.7.6 -- py-1.4.30 -- pytest-2.7.2 -- /home/mikeb/Impala/bin/../infra/python/env/bin/python
      rootdir: /home/mikeb/Impala/tests, inifile: pytest.ini
      plugins: xdist, random
      collected 7 items
      
      cluster_tests.py::TestCluster::test_cmd PASSED
      cluster_tests.py::TestHdfs::test_ls PASSED
      cluster_tests.py::TestHive::test_list_databases PASSED
      cluster_tests.py::TestHive::test_non_mr_exec PASSED
      cluster_tests.py::TestImpala::test_list_databases PASSED
      cluster_tests.py::TestImpala::test_exec PASSED
      cluster_tests.py::TestModel::test_table_model FAILED
      
      =================================== FAILURES ===================================
      __________________________ TestModel.test_table_model __________________________
      cluster_tests.py:88: in test_table_model
          cursor.create_table(table)
      db_connection.py:693: in create_table
          super(ImpalaCursor, self).create_table(table)
      db_connection.py:426: in create_table
          raise Exception('At least one col is required')
      E   Exception: At least one col is required
      ---------------------------- Captured stderr setup -----------------------------
      MainThread: Connecting to HiveServer2 localhost:21050 with NOSASL authentication mechanism
      MainThread: Getting a cursor (Impala session)
      MainThread: Connecting to HiveServer2 127.0.0.1:11050 with PLAIN authentication mechanism
      MainThread: Getting a cursor (Impala session)
      ----------------------------- Captured stderr call -----------------------------
      MainThread: Dropping table some_test_table
      MainThread: Executing query DROP TABLE IF EXISTS some_test_table
      MainThread: Waiting for query to finish
      MainThread: Query finished
      MainThread: Creating table some_test_table
      =========================== short test summary info ============================
      FAIL cluster_tests.py::TestModel::()::test_table_model
      ====================== 1 failed, 6 passed in 3.81 seconds ======================
      mikeb@mikeb-desktop:1:~/Impala/tests/comparison (asf-master) $
      

        Activity

        Hide
        mikesbrown Michael Brown added a comment -

        commit 0c874189ed902d566b3df37959c937ff6a7bfee8
        Author: Michael Brown <mikeb@cloudera.com>
        Date: Tue Sep 13 12:30:26 2016 -0700

        IMPALA-4122: qgen: fix bitrotted cluster unit tests

        There's a small set of pytest-style tests and associated conftest for
        testing some of the cluster-related test infrastructure Python objects.
        Going forward, I want unit tests for the query generator to be run as
        part of patch acceptance (CI isn't necessary at this time).

        This patch fixes a bitrotted test and moves the tests into the
        tests-for-qgen directory. The moves were performed thusly:

        $ git mv conftest.py tests/
        $ git mv cluster_tests.py tests/test_cluster.py

        Change-Id: I3e855e265ae245ebe3691d077284ac5761909e00
        Reviewed-on: http://gerrit.cloudera.org:8080/4404
        Reviewed-by: Michael Brown <mikeb@cloudera.com>
        Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com>
        Tested-by: Internal Jenkins

        Show
        mikesbrown Michael Brown added a comment - commit 0c874189ed902d566b3df37959c937ff6a7bfee8 Author: Michael Brown <mikeb@cloudera.com> Date: Tue Sep 13 12:30:26 2016 -0700 IMPALA-4122 : qgen: fix bitrotted cluster unit tests There's a small set of pytest-style tests and associated conftest for testing some of the cluster-related test infrastructure Python objects. Going forward, I want unit tests for the query generator to be run as part of patch acceptance (CI isn't necessary at this time). This patch fixes a bitrotted test and moves the tests into the tests-for-qgen directory. The moves were performed thusly: $ git mv conftest.py tests/ $ git mv cluster_tests.py tests/test_cluster.py Change-Id: I3e855e265ae245ebe3691d077284ac5761909e00 Reviewed-on: http://gerrit.cloudera.org:8080/4404 Reviewed-by: Michael Brown <mikeb@cloudera.com> Reviewed-by: Tim Armstrong <tarmstrong@cloudera.com> Tested-by: Internal Jenkins

          People

          • Assignee:
            mikesbrown Michael Brown
            Reporter:
            mikesbrown Michael Brown
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development