Impala Public Jenkins has submitted this change and it was merged. ( http://gerrit.cloudera.org:8080/22404 )
Change subject: IMPALA-13694: Add ImpalaTestSuite.__reset_impala_clients method ...................................................................... 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 <[email protected]> Reviewed-by: Jason Fehr <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- M tests/authorization/test_authorization.py M tests/beeswax/impala_beeswax.py M tests/common/impala_connection.py M tests/common/impala_test_suite.py M tests/common/test_vector.py M tests/custom_cluster/test_admission_controller.py M tests/custom_cluster/test_hs2_fault_injection.py M tests/custom_cluster/test_kudu.py M tests/custom_cluster/test_mt_dop.py M tests/custom_cluster/test_runtime_filter_aggregation.py M tests/hs2/hs2_test_suite.py M tests/query_test/test_exprs.py M tests/query_test/test_hdfs_caching.py M tests/query_test/test_iceberg.py M tests/query_test/test_insert_behaviour.py M tests/query_test/test_kudu.py M tests/query_test/test_runtime_filters.py 17 files changed, 253 insertions(+), 113 deletions(-) Approvals: Csaba Ringhofer: Looks good to me, but someone else must approve Jason Fehr: Looks good to me, approved Impala Public Jenkins: Verified -- To view, visit http://gerrit.cloudera.org:8080/22404 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: merged Gerrit-Change-Id: Ieb47fec9f384cb58b19fdbd10ff7aa0850ad6277 Gerrit-Change-Number: 22404 Gerrit-PatchSet: 8 Gerrit-Owner: Riza Suminto <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Daniel Becker <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Jason Fehr <[email protected]> Gerrit-Reviewer: Quanlong Huang <[email protected]> Gerrit-Reviewer: Riza Suminto <[email protected]>
