[ 
https://issues.apache.org/jira/browse/IMPALA-13694?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17930220#comment-17930220
 ] 

ASF subversion and git services commented on IMPALA-13694:
----------------------------------------------------------

Commit e753e94a798978f00f754718957e7f9a0f74b3e6 in impala's branch 
refs/heads/branch-4.5.0 from Riza Suminto
[ https://gitbox.apache.org/repos/asf?p=impala.git;h=e753e94a7 ]

IMPALA-13694: Add ImpalaTestSuite.__reset_impala_clients method

This patch adds __reset_impala_clients() method in ImpalaConnection.
__reset_impala_clients() then simply clear configuration. It is called
on each setup_method() to ensure that each EE test uses clean test
client. All subclasses of ImpalaTestSuite that declare setup() method
are refactored to declare setup_method() instead, to match newer py.test
convention. Also implement teardown_method() to complement
setup_method(). See "Method and function level setup/teardown" at
https://docs.pytest.org/en/stable/how-to/xunit_setup.html.

CustomClusterTestSuite fully overrides setup_method() and
teardown_method() because it subclasses can be destructive. The custom
cluster test method often restart the whole Impala cluster, rendering
default impala clients initialized at setup_class() unusable. Each
subclass of CustomClusterTestSuite is responsible to ensure that impala
client they are using is in a good state.

This patch improve BeeswaxConnection and ImpylaHS2Connection to only
consider non-REMOVED options as its default options. They lookup for
valid (not REMOVED) query options with their own appropriate way,
memorized the option names as lowercase string and the values as string.
List values are wrapped with double quote. Log in
ImpalaConnection.set_configuration_option() is differentiated from how
SET query looks.

Note that ImpalaTestSuite.run_test_case() modify and restore query
option written at .test file by issuing SET query, not by calling
ImpalaConnection.set_configuration_option(). It is remain unchanged.

Consistently lower case query option everywhere in Impala test code
infrastructure. Fixed several tests that has been unknowingly override
'exec_option' vector dimension due to case sensitive mismatch. Also
fixed some flake8 issues.

Added convenience method execute_query_using_vector() and
create_impala_client_from_vector() in ImpalaTestSuite.

Testing:
- Pass core tests.

Change-Id: Ieb47fec9f384cb58b19fdbd10ff7aa0850ad6277
Reviewed-on: http://gerrit.cloudera.org:8080/22404
Reviewed-by: Csaba Ringhofer <csringho...@cloudera.com>
Reviewed-by: Jason Fehr <jf...@cloudera.com>
Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>


> Add ImpalaConnection.reset_configuration method.
> ------------------------------------------------
>
>                 Key: IMPALA-13694
>                 URL: https://issues.apache.org/jira/browse/IMPALA-13694
>             Project: IMPALA
>          Issue Type: Improvement
>          Components: Test
>            Reporter: Riza Suminto
>            Assignee: Riza Suminto
>            Priority: Major
>             Fix For: Impala 4.6.0
>
>
> ImpalaTestSuite.run_test_case() reuse ImpalaConnection and restore its 
> configuration at the end of test via 
> ImpalaTestSuite.__restore_query_options(). We should make restoring query 
> options to default value generic inside ImpalaConnection. Currently, 
> ImpalaConnection has set_configuration, set_configuration_option, 
> get_default_configuration, and clear_configuration method, but there is no 
> reset_configuration method.
> Impala py.test code should also consistently lower case query options names 
> everywhere, following standard set by IMPALA-13319.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-all-unsubscr...@impala.apache.org
For additional commands, e-mail: issues-all-h...@impala.apache.org

Reply via email to