This is an automated email from the ASF dual-hosted git repository. joemcdonnell pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 742d8d05f5e7bbdef156b79dfd8f82008280f9ee Author: jfehr <[email protected]> AuthorDate: Thu May 29 12:15:52 2025 -0600 IMPALA-14090: Move Some Stable Custom Cluster Tests to Exhaustive Moves several custom cluster tests out of core and into exhaustive only. The tests were chosen based on their stability, lack of recent modifications, and coverage of rare/corner cases. Testing was accomplished by running both core and exhaustive tests and manually verifying the tests were or were not skipped as expected. Change-Id: If99c015a0cb5d95b1607ca2be48d2dea04194f81 Reviewed-on: http://gerrit.cloudera.org:8080/22963 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- tests/common/skip.py | 13 +++++++++++++ tests/custom_cluster/test_query_log.py | 9 +++++++++ tests/custom_cluster/test_topic_update_frequency.py | 3 ++- tests/custom_cluster/test_workload_mgmt_init.py | 2 ++ tests/custom_cluster/test_workload_mgmt_sql_details.py | 3 +++ 5 files changed, 29 insertions(+), 1 deletion(-) diff --git a/tests/common/skip.py b/tests/common/skip.py index 641da4169..d26b66b09 100644 --- a/tests/common/skip.py +++ b/tests/common/skip.py @@ -29,6 +29,7 @@ from tests.common.environ import (ImpalaTestClusterProperties, HIVE_MAJOR_VERSION, IS_APACHE_HIVE, IS_TEST_JDK, IS_TUPLE_CACHE) +from tests.common.impala_test_suite import ImpalaTestSuite from tests.common.kudu_test_suite import get_kudu_master_flag from tests.util.filesystem_utils import ( IS_ABFS, @@ -46,6 +47,7 @@ from tests.util.filesystem_utils import ( SECONDARY_FILESYSTEM) IMPALA_TEST_CLUSTER_PROPERTIES = ImpalaTestClusterProperties.get_instance() +EXPLORATION_STRATEGY_EXHAUSTIVE = 'exhaustive' class SkipIfFS: @@ -272,3 +274,14 @@ class SkipIfApacheHive(): data_connector_not_supported = pytest.mark.skipif( IS_APACHE_HIVE and HIVE_MAJOR_VERSION <= 3, reason="Apache Hive 3.1 or older version do not support DataConnector") + + +class SkipIfExploration: + """Exposes decorators as methods so that tests can be skipped based on exploration + strategy""" + + @classmethod + def is_not_exhaustive(cls, skip_msg='runs only in exhaustive'): + return pytest.mark.skipif( + ImpalaTestSuite.exploration_strategy() != EXPLORATION_STRATEGY_EXHAUSTIVE, + reason=skip_msg) diff --git a/tests/custom_cluster/test_query_log.py b/tests/custom_cluster/test_query_log.py index 23513fbd4..f1e7a7bd8 100644 --- a/tests/custom_cluster/test_query_log.py +++ b/tests/custom_cluster/test_query_log.py @@ -33,6 +33,7 @@ from tests.common.cluster_config import impalad_admission_ctrl_config_args from tests.common.custom_cluster_test_suite import CustomClusterTestSuite from tests.common.impala_connection import FINISHED from tests.common.impala_test_suite import IMPALAD_HS2_HOST_PORT +from tests.common.skip import SkipIfExploration from tests.common.test_dimensions import hs2_client_protocol_dimension from tests.common.test_vector import ImpalaTestDimension from tests.common.wm_test_suite import WorkloadManagementTestSuite @@ -57,6 +58,7 @@ class TestQueryLogTableBasic(WorkloadManagementTestSuite): MAX_SQL_PLAN_LEN = 2000 LOG_DIR_MAX_WRITES = 'max_attempts_exceeded' + @SkipIfExploration.is_not_exhaustive() @CustomClusterTestSuite.with_args(impalad_args="--cluster_id=test_max_select " "--query_log_max_sql_length={0} " "--query_log_max_plan_length={0}" @@ -94,6 +96,7 @@ class TestQueryLogTableBasic(WorkloadManagementTestSuite): assert len(data[1]) == self.MAX_SQL_PLAN_LEN - data[1].count("\n") - 1, \ "incorrect plan length" + @SkipIfExploration.is_not_exhaustive() @CustomClusterTestSuite.with_args(impalad_args="--cluster_id=test_max_select", workload_mgmt=True, disable_log_buffering=True) @@ -127,6 +130,7 @@ class TestQueryLogTableBasic(WorkloadManagementTestSuite): # Newline characters are not counted by Impala's length function. assert len(data[1]) == 16777216 - data[1].count("\n") - 1 + @SkipIfExploration.is_not_exhaustive() @CustomClusterTestSuite.with_args(impalad_args="--cluster_id=test_query_hist_1 " "--query_log_size=0 " "--query_log_size_in_bytes=0", @@ -245,6 +249,7 @@ class TestQueryLogTableBasic(WorkloadManagementTestSuite): assert impalad.service.get_metric_value( "impala-server.completed-queries.written") == 0 + @SkipIfExploration.is_not_exhaustive() @CustomClusterTestSuite.with_args(cluster_size=3, num_exclusive_coordinators=2, workload_mgmt=True, @@ -270,6 +275,7 @@ class TestQueryLogTableBasic(WorkloadManagementTestSuite): finally: client2.close() + @SkipIfExploration.is_not_exhaustive() @CustomClusterTestSuite.with_args(cluster_size=3, num_exclusive_coordinators=2, workload_mgmt=True, @@ -314,6 +320,7 @@ class TestQueryLogTableBasic(WorkloadManagementTestSuite): assert_query(QUERY_TBL_LOG, client, raw_profile=result.runtime_profile) [email protected]_not_exhaustive() class TestQueryLogOtherTable(WorkloadManagementTestSuite): """Tests to assert that query_log_table_name works with non-default value.""" @@ -1122,6 +1129,7 @@ class TestQueryLogTableFlush(CustomClusterTestSuite): r'gather_time="\S+" exec_time="\S+" query_id="{}"' .format(QUERY_TBL_LOG, self.insert_query_id)) + @SkipIfExploration.is_not_exhaustive() @CustomClusterTestSuite.with_args(impalad_args="--query_log_write_interval_s=9999 " "--shutdown_grace_period_s=0 " "--shutdown_deadline_s=15 " @@ -1164,6 +1172,7 @@ class TestQueryLogTableFlush(CustomClusterTestSuite): assert retry(func=assert_func, max_attempts=5, sleep_time_s=3) + @SkipIfExploration.is_not_exhaustive() @CustomClusterTestSuite.with_args(impalad_args="--query_log_write_interval_s=9999 " "--shutdown_grace_period_s=0 " "--query_log_shutdown_timeout_s=3 " diff --git a/tests/custom_cluster/test_topic_update_frequency.py b/tests/custom_cluster/test_topic_update_frequency.py index f7e2b1581..18428cb60 100644 --- a/tests/custom_cluster/test_topic_update_frequency.py +++ b/tests/custom_cluster/test_topic_update_frequency.py @@ -17,10 +17,11 @@ import pytest import time from tests.common.custom_cluster_test_suite import CustomClusterTestSuite -from tests.common.skip import SkipIfFS +from tests.common.skip import SkipIfFS, SkipIfExploration @SkipIfFS.variable_listing_times [email protected]_not_exhaustive() class TestTopicUpdateFrequency(CustomClusterTestSuite): @pytest.mark.execute_serially diff --git a/tests/custom_cluster/test_workload_mgmt_init.py b/tests/custom_cluster/test_workload_mgmt_init.py index 4191ff979..b7c1fa492 100644 --- a/tests/custom_cluster/test_workload_mgmt_init.py +++ b/tests/custom_cluster/test_workload_mgmt_init.py @@ -26,6 +26,7 @@ from tests.common.custom_cluster_test_suite import ( CustomClusterTestSuite, WORKLOAD_MGMT_IMPALAD_FLAGS, ) +from tests.common.skip import SkipIfExploration from tests.common.test_dimensions import hs2_client_protocol_dimension from tests.common.test_vector import HS2 from tests.util.workload_management import ( @@ -43,6 +44,7 @@ QUERY_TBL_ALL = "{},{}".format(QUERY_TBL_LOG_NAME, QUERY_TBL_LIVE_NAME) LATEST_SCHEMA = "1.2.0" [email protected]_not_exhaustive() class TestWorkloadManagementInitBase(CustomClusterTestSuite): """Defines common setup and methods for all workload management init tests. diff --git a/tests/custom_cluster/test_workload_mgmt_sql_details.py b/tests/custom_cluster/test_workload_mgmt_sql_details.py index b2839d8d1..fc04ea125 100644 --- a/tests/custom_cluster/test_workload_mgmt_sql_details.py +++ b/tests/custom_cluster/test_workload_mgmt_sql_details.py @@ -21,11 +21,13 @@ import os from impala_thrift_gen.SystemTables.ttypes import TQueryTableColumn from tests.common.custom_cluster_test_suite import CustomClusterTestSuite +from tests.common.skip import SkipIfExploration from tests.common.test_dimensions import hs2_client_protocol_dimension from tests.common.wm_test_suite import WorkloadManagementTestSuite from tests.util.workload_management import assert_csv_col, QUERY_TBL_LOG [email protected]_not_exhaustive() @CustomClusterTestSuite.with_args( cluster_size=1, disable_log_buffering=True, workload_mgmt=True, impalad_args="--query_log_max_queued=1") @@ -416,6 +418,7 @@ class TestWorkloadManagementSQLDetails(WorkloadManagementTestSuite): "functional") [email protected]_not_exhaustive() class TestWorkloadManagementSQLDetailsCalcite(WorkloadManagementTestSuite): """Variant of TestWorkloadManagementSQLDetails using calcite planner."""
