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 7f38c7ed61a0536c430311b3d4600aa0a16b988a
Author: Riza Suminto <[email protected]>
AuthorDate: Tue Mar 25 17:40:26 2025 -0700

    IMPALA-13890: Deflake test_coord_only_pool_one_quiescing_coord
    
    test_coord_only_pool_one_quiescing_coord was flaky in UBSAN build for
    not finding the pid of the quiescing coordinator. It is possible that
    the quiescing coordinator was stil alive when the test method arrive
    inside ImpalaCluster.graceful_shutdown_impalads() loop. This patch
    attempt to deflake it by additionally call
    coord_to_quiesce.wait_for_exit() at the end of test method. The test
    method is renamed to test_coord_only_pool_one_coord_quiescing to share
    prefix with test_coord_only_pool_one_coord_terminate.
    
    This patch also harden test_coord_only_pool_one_coord_terminate by
    applying the same change.
    
    Testing:
    Loop the following test command 10 times in UBSAN build:
    impala-py.test --exploration=exhaustive \
      -k test_coord_only_pool_one_coord \
      custom_cluster/test_admission_controller.py
    
    Change-Id: I34e369a6a6eb77ef95e7526c17028bf6b8b04172
    Reviewed-on: http://gerrit.cloudera.org:8080/22673
    Reviewed-by: Impala Public Jenkins <[email protected]>
    Tested-by: Impala Public Jenkins <[email protected]>
---
 tests/custom_cluster/test_admission_controller.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/tests/custom_cluster/test_admission_controller.py 
b/tests/custom_cluster/test_admission_controller.py
index d7673e580..b5266c675 100644
--- a/tests/custom_cluster/test_admission_controller.py
+++ b/tests/custom_cluster/test_admission_controller.py
@@ -1940,7 +1940,7 @@ class 
TestAdmissionController(TestAdmissionControllerBase):
         fs_allocation_file="fair-scheduler-onlycoords.xml",
         llama_site_file="llama-site-onlycoords.xml"),
       statestored_args=_STATESTORED_ARGS)
-  def test_coord_only_pool_one_quiescing_coord(self, vector):
+  def test_coord_only_pool_one_coord_quiescing(self, vector):
     """Asserts quiescing coordinators do not run fragment instances for 
queries that only
        select from the active queries table."""
     self.wait_for_wm_init_complete()
@@ -1955,6 +1955,8 @@ class 
TestAdmissionController(TestAdmissionControllerBase):
     self.__run_assert_systables_query(
         vector=vector,
         expected_coords=[all_coords[0], all_coords[2]])
+    # Wait until quiescing coordinator exit.
+    coord_to_quiesce.wait_for_exit()
 
   @pytest.mark.execute_serially
   @CustomClusterTestSuite.with_args(num_exclusive_coordinators=3, 
cluster_size=5,
@@ -1998,6 +2000,8 @@ class 
TestAdmissionController(TestAdmissionControllerBase):
 
     assert done_waiting
     self.__assert_systables_query(result.runtime_profile, [all_coords[0], 
all_coords[1]])
+    # Ensure that coord_to_term has truly exit.
+    coord_to_term.wait_for_exit()
 
   @pytest.mark.execute_serially
   @CustomClusterTestSuite.with_args(num_exclusive_coordinators=3, 
cluster_size=5,

Reply via email to