Repository: incubator-impala Updated Branches: refs/heads/master 2c07ca3aa -> e57fd2d83
IMPALA-3491: Use unique_database fixture in test_local_fs.py Testing: Ran hdfs/core and localfs/core private builds. Change-Id: I0720458882ac3b1138deccf9af0ee57bf2eed7dc Reviewed-on: http://gerrit.cloudera.org:8080/3334 Reviewed-by: Alex Behm <[email protected]> Tested-by: Alex Behm <[email protected]> Project: http://git-wip-us.apache.org/repos/asf/incubator-impala/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-impala/commit/e57fd2d8 Tree: http://git-wip-us.apache.org/repos/asf/incubator-impala/tree/e57fd2d8 Diff: http://git-wip-us.apache.org/repos/asf/incubator-impala/diff/e57fd2d8 Branch: refs/heads/master Commit: e57fd2d831f51d19cf0a1b961d3bb5d69a1a612f Parents: 2c07ca3 Author: Alex Behm <[email protected]> Authored: Tue May 17 10:17:13 2016 -0700 Committer: Tim Armstrong <[email protected]> Committed: Wed Jun 8 16:30:32 2016 -0700 ---------------------------------------------------------------------- .../queries/QueryTest/local-filesystem.test | 14 +++----------- tests/query_test/test_local_fs.py | 13 ++----------- 2 files changed, 5 insertions(+), 22 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/e57fd2d8/testdata/workloads/functional-query/queries/QueryTest/local-filesystem.test ---------------------------------------------------------------------- diff --git a/testdata/workloads/functional-query/queries/QueryTest/local-filesystem.test b/testdata/workloads/functional-query/queries/QueryTest/local-filesystem.test index a2c4d2a..50e2666 100644 --- a/testdata/workloads/functional-query/queries/QueryTest/local-filesystem.test +++ b/testdata/workloads/functional-query/queries/QueryTest/local-filesystem.test @@ -1,17 +1,13 @@ ==== ---- QUERY -drop table if exists local_fs_db.tbl ----- RESULTS -==== ----- QUERY -create external table local_fs_db.tbl +create external table tbl (c0 string, c1 string, c2 string, c3 int, c4 int, c5 int) row format delimited fields terminated by ',' location 'file://$IMPALA_HOME/testdata/data/local_tbl' ---- RESULTS ==== ---- QUERY -describe local_fs_db.tbl +describe tbl ---- RESULTS 'c0','string','' 'c1','string','' @@ -23,14 +19,10 @@ describe local_fs_db.tbl STRING, STRING, STRING ==== ---- QUERY -select * from local_fs_db.tbl +select * from tbl ---- RESULTS 'a','b','c',1,2,3 'x','y','z',9,8,7 ---- TYPES STRING, STRING, STRING, INT, INT, INT ==== ----- QUERY -drop table local_fs_db.tbl ----- RESULTS -==== \ No newline at end of file http://git-wip-us.apache.org/repos/asf/incubator-impala/blob/e57fd2d8/tests/query_test/test_local_fs.py ---------------------------------------------------------------------- diff --git a/tests/query_test/test_local_fs.py b/tests/query_test/test_local_fs.py index f9bf01e..e0e3cb7 100644 --- a/tests/query_test/test_local_fs.py +++ b/tests/query_test/test_local_fs.py @@ -1,7 +1,6 @@ # Copyright (c) 2015 Cloudera, Inc. All rights reserved. # Validates table stored on the LocalFileSystem. # -import pytest from tests.common.impala_test_suite import ImpalaTestSuite from tests.common.test_dimensions import create_single_exec_option_dimension @@ -19,13 +18,5 @@ class TestLocalFileSystem(ImpalaTestSuite): v.get_value('table_format').file_format == 'text' and \ v.get_value('table_format').compression_codec == 'none') - def setup_method(self, method): - self.cleanup_db("local_fs_db") - self.client.execute("create database local_fs_db") - - def teardown_method(self, method): - self.cleanup_db("local_fs_db") - - @pytest.mark.execute_serially - def test_local_filesystem(self, vector): - self.run_test_case('QueryTest/local-filesystem', vector) + def test_local_filesystem(self, vector, unique_database): + self.run_test_case('QueryTest/local-filesystem', vector, unique_database)
