This is an automated email from the ASF dual-hosted git repository.

stigahuang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/impala.git

commit e22c0d33d64aed93a9df1c7a0ca63308595252a5
Author: Riza Suminto <[email protected]>
AuthorDate: Mon Jun 23 14:56:03 2025 -0700

    IMPALA-13917 (part 1): Remove Beeswax from protocol dimension
    
    Beeswax protocol has been due for deprecation in a long time. This patch
    remove BEESWAX from create_client_protocol_dimension(). This will limit
    protocol dimension to [HS2, HS2_HTTP] by default. It is still possible
    to include BEESWAX again for testing if DEFAULT_TEST_PROTOCOL env var is
    set to 'beeswax', such as:
    
    DEFAULT_TEST_PROTOCOL=beeswax impala-py.test custom_cluster/test_ipv6.py
    
    This patch does not disable beeswax server yet. Some tests that
    specifically test against beeswax protocol, such as test_beeswax.py,
    will continue to work. ImpalaTestSuite.beeswax_client also remain
    unchanged.
    
    Testing:
    Run following command and confirm that beeswax protocol is skipped.
    
    impala-py.test --collect-only --exploration=exhaustive \
      custom_cluster/test_ipv6.py
    
    Change-Id: I3cff79f59305b5d44944804ed1f1b92838575495
    Reviewed-on: http://gerrit.cloudera.org:8080/23076
    Reviewed-by: Jason Fehr <[email protected]>
    Tested-by: Riza Suminto <[email protected]>
---
 tests/common/test_dimensions.py | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/tests/common/test_dimensions.py b/tests/common/test_dimensions.py
index de65d10b5..4137347f9 100644
--- a/tests/common/test_dimensions.py
+++ b/tests/common/test_dimensions.py
@@ -169,22 +169,20 @@ def default_client_protocol_dimension():
   return ImpalaTestDimension(PROTOCOL, 
pytest.config.option.default_test_protocol)
 
 
-def beeswax_client_protocol_dimension():
-  return ImpalaTestDimension(PROTOCOL, BEESWAX)
-
-
 def hs2_client_protocol_dimension():
   return ImpalaTestDimension(PROTOCOL, HS2)
 
 
 def create_client_protocol_dimension():
+  protocols_to_test = [HS2]
+  if pytest.config.option.default_test_protocol == BEESWAX:
+    protocols_to_test.append(BEESWAX)
   # IMPALA-8864: Older python versions do not support SSLContext object that 
the thrift
-  # http client implementation depends on. Falls back to a dimension without 
http
-  # transport.
+  # http client implementation depends on. Otherwise, include HS2_HTTP.
   import ssl
-  if not hasattr(ssl, "create_default_context"):
-    return ImpalaTestDimension(PROTOCOL, BEESWAX, HS2)
-  return ImpalaTestDimension(PROTOCOL, BEESWAX, HS2, HS2_HTTP)
+  if hasattr(ssl, "create_default_context"):
+    protocols_to_test.append(HS2_HTTP)
+  return ImpalaTestDimension(PROTOCOL, *protocols_to_test)
 
 
 def create_client_protocol_http_transport():

Reply via email to