You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@impala.apache.org by ta...@apache.org on 2016/05/12 22:10:17 UTC
[42/50] [abbrv] incubator-impala git commit: IMPALA-3491: Use
unique_database fixture in test_views_compatibility.
IMPALA-3491: Use unique_database fixture in test_views_compatibility.
Testing: Ran the test locally. It was already possible to run the
test in parallel before.
Change-Id: I68a1349276c90a42c238bed40a1c7c221199a67a
Reviewed-on: http://gerrit.cloudera.org:8080/3009
Reviewed-by: Alex Behm <al...@cloudera.com>
Tested-by: Internal Jenkins
Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/1c19c232
Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/1c19c232
Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/1c19c232
Branch: refs/heads/master
Commit: 1c19c232f3cc40a99efa3e80d225726c31dd8167
Parents: ca3f911
Author: Alex Behm <al...@cloudera.com>
Authored: Mon May 9 11:18:39 2016 -0700
Committer: Tim Armstrong <ta...@cloudera.com>
Committed: Thu May 12 14:18:02 2016 -0700
----------------------------------------------------------------------
tests/metadata/test_views_compatibility.py | 19 +++++--------------
1 file changed, 5 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/1c19c232/tests/metadata/test_views_compatibility.py
----------------------------------------------------------------------
diff --git a/tests/metadata/test_views_compatibility.py b/tests/metadata/test_views_compatibility.py
index 8f87405..20c5dd2 100644
--- a/tests/metadata/test_views_compatibility.py
+++ b/tests/metadata/test_views_compatibility.py
@@ -42,7 +42,6 @@ from tests.util.filesystem_utils import WAREHOUSE
@SkipIfIsilon.hive
@SkipIfLocal.hive
class TestViewCompatibility(ImpalaTestSuite):
- TEST_DB_NAME = "view_compat_test_db"
VALID_SECTION_NAMES = ["CREATE_VIEW", "CREATE_VIEW_RESULTS",\
"QUERY_HIVE_VIEW_RESULTS", "QUERY_IMPALA_VIEW_RESULTS"]
@@ -62,19 +61,11 @@ class TestViewCompatibility(ImpalaTestSuite):
# There is no reason to run these tests using all dimensions.
cls.TestMatrix.add_dimension(create_uncompressed_text_dimension(cls.get_workload()))
- def setup_method(self, method):
- # cleanup and create a fresh test database
- self.cleanup_db(self.TEST_DB_NAME)
- self.execute_query("create database %s location '%s/%s'" % (self.TEST_DB_NAME,
- WAREHOUSE, self.TEST_DB_NAME))
+ def test_view_compatibility(self, vector, unique_database):
+ self._run_view_compat_test_case('QueryTest/views-compatibility', vector,
+ unique_database)
- def teardown_method(self, method):
- self.cleanup_db(self.TEST_DB_NAME)
-
- def test_view_compatibility(self, vector):
- self._run_view_compat_test_case('QueryTest/views-compatibility', vector)
-
- def _run_view_compat_test_case(self, test_file_name, vector):
+ def _run_view_compat_test_case(self, test_file_name, vector, test_db_name):
"""
Runs a view-compatibility test file, containing the following sections:
@@ -93,7 +84,7 @@ class TestViewCompatibility(ImpalaTestSuite):
for test_section in sections:
# validate the test
- test_case = ViewCompatTestCase(test_section, test_file_name, self.TEST_DB_NAME)
+ test_case = ViewCompatTestCase(test_section, test_file_name, test_db_name)
# create views in Hive and Impala checking against the expected results
self._exec_in_hive(test_case.get_create_view_sql('HIVE'),\