Riza Suminto has uploaded this change for review. ( http://gerrit.cloudera.org:8080/22782
Change subject: IMPALA-13967: Move away from setting user parameter in execute ...................................................................... IMPALA-13967: Move away from setting user parameter in execute ImpalaConnection.execute and ImpalaConnection.execute_async has 'user' parameter to set specific user to run the query. This is mainly legacy of BeeswaxConnection, which allows using 1 client to run queries under different usernames. BeeswaxConnection and ImpylaHS2Connection actually allows specifying one user per client. Doing so will simplify user-specific test such as test_ranger.py that often instantiate separate clients for admin user and regular user. There is no need to specify 'user' parameter anymore when calling execute() or execute_async(). Thus, reducing potential bug from forgetting to set one or setting it with incorrect value. This patch applies one-user-per-client practice as much as possible for test_ranger.py, test_authorization.py, and test_admission_controller.py. Unused code and pytest fixtures are removed. Few flake8 issues are addressed too. Their default_test_protocol() is overridden to return 'hs2'. ImpylaHS2Connection.execute() and ImpylaHS2Connection.execute_async() are slightly modified to assume ImpylaHS2Connection.__user if 'user' parameter in None. BeeswaxConnection remain unchanged. Testing: Run and pass all modified tests in exhaustive exploration. Change-Id: I20990d773f3471c129040cefcdff1c6d89ce87eb --- M testdata/workloads/functional-query/queries/QueryTest/ranger_alltypes_mask.test M testdata/workloads/functional-query/queries/QueryTest/ranger_alltypes_mask_date_show_year.test M testdata/workloads/functional-query/queries/QueryTest/ranger_alltypes_mask_hash.test M testdata/workloads/functional-query/queries/QueryTest/ranger_alltypes_mask_none.test M testdata/workloads/functional-query/queries/QueryTest/ranger_alltypes_mask_null.test M testdata/workloads/functional-query/queries/QueryTest/ranger_alltypes_mask_show_first_4.test M testdata/workloads/functional-query/queries/QueryTest/ranger_alltypes_mask_show_last_4.test M tests/authorization/test_authorization.py M tests/authorization/test_ranger.py M tests/common/impala_connection.py M tests/common/impala_service.py M tests/common/impala_test_suite.py M tests/custom_cluster/test_admission_controller.py 13 files changed, 342 insertions(+), 414 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/82/22782/1 -- To view, visit http://gerrit.cloudera.org:8080/22782 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I20990d773f3471c129040cefcdff1c6d89ce87eb Gerrit-Change-Number: 22782 Gerrit-PatchSet: 1 Gerrit-Owner: Riza Suminto <riza.sumi...@cloudera.com>