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 9000c83efc573a6edccba2f58e26380357694d12
Author: Riza Suminto <[email protected]>
AuthorDate: Wed Apr 16 19:21:41 2025 -0700

    IMPALA-13971: Deflake TestAdmissionController.test_user_loads_rules
    
    TestAdmissionController.test_user_loads_rules is flaky for not failing
    the last query that should exceed the user quota. The test executes
    queries in a round-robin fashion across all impalad. These impalads are
    expected to synchronize user quota count through statestore updates.
    
    This patch attempts to deflake the test by raising the heartbeat wait
    time from 1 heartbeat period to 3 hearbeat periods. It also changes the
    reject query to a fast version of SLOW_QUERY (without sleep) so the test
    can fail fast if it is not rejected.
    
    Testing:
    Loop the test 50 times and pass them all.
    
    Change-Id: Ib2ae8e1c2edf174edbf0e351d3c2ed06a0539f08
    Reviewed-on: http://gerrit.cloudera.org:8080/22787
    Reviewed-by: Riza Suminto <[email protected]>
    Tested-by: Riza Suminto <[email protected]>
---
 tests/custom_cluster/test_admission_controller.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/custom_cluster/test_admission_controller.py 
b/tests/custom_cluster/test_admission_controller.py
index 22bf288be..8f70e03ff 100644
--- a/tests/custom_cluster/test_admission_controller.py
+++ b/tests/custom_cluster/test_admission_controller.py
@@ -1406,14 +1406,14 @@ class 
TestAdmissionController(TestAdmissionControllerBase):
       query_handles.append(query_handle)
 
     # Let state sync across impalads.
-    wait_statestore_heartbeat()
+    wait_statestore_heartbeat(num_heartbeat=3)
 
     # Another query should be rejected
     impalad = self.cluster.impalads[limit % 2]
     client = impalad.service.create_hs2_client(user=user)
     client.set_configuration({'request_pool': pool})
     try:
-      client.execute(SLOW_QUERY)
+      client.execute('select count(*) from functional.alltypes')
       assert False, "query should fail"
     except IMPALA_CONNECTION_EXCEPTION as e:
       # Construct the expected error message.

Reply via email to