[
https://issues.apache.org/jira/browse/IMPALA-13758?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17928687#comment-17928687
]
ASF subversion and git services commented on IMPALA-13758:
----------------------------------------------------------
Commit 9cb9bae84e8888203e4bdfd3e20ee3e61c6059fe in impala's branch
refs/heads/master from Riza Suminto
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=9cb9bae84 ]
IMPALA-13758: Use context manager in ImpalaTestSuite.change_database
ImpalaTestSuite.change_database is responsible to point impala client to
database under test. However, it left client pointing to that database
after the test without reverting them back to default database. This
patch does the reversal by changing ImpalaTestSuite.change_database to
use context manager.
This patch change the behavior of execute_query_using_client() and
execute_query_async_using_client(). They used to change database
according to the given vector parameter, but not anymore after this
patch. In practice, this behavior change does not affect many tests
because most queries going through these functions already use fully
qualified table name. Going forward, querying through function other
than run_test_case() should try to use fully qualified table name as
much as possible.
Retain behavior of ImpalaTestSuite._get_table_location() since there are
considerable number of tests relies on it (changing database when
called).
Removed unused test fixtures and fixed several flake8 issues in modified
test files.
Testing:
- Moved nested-types-subplan-single-node.test. This allows the test
framework to point to the right tpch_nested* database.
- Pass exhaustive test except IMPALA-13752 and IMPALA-13761. They will
be fixed in separate patch.
Change-Id: I75bec7403cc302728a630efe3f95e852a84594e2
Reviewed-on: http://gerrit.cloudera.org:8080/22487
Reviewed-by: Csaba Ringhofer <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
> Use context manager in ImpalaTestSuite.change_database
> ------------------------------------------------------
>
> Key: IMPALA-13758
> URL: https://issues.apache.org/jira/browse/IMPALA-13758
> Project: IMPALA
> Issue Type: Improvement
> Reporter: Riza Suminto
> Assignee: Riza Suminto
> Priority: Major
>
> ImpalaTestSuite.change_database is responsible to point impala client to
> database under test. However, it leaves client pointing to that database
> after the test without reverting the client back to default database. We can
> do the reversal by changing ImpalaTestSuite.change_database to use context
> manager.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]