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 a34bb2ad1128a6f401ffd457db8d8fd8e1270374
Author: Bikramjeet Vig <bikram.sng...@gmail.com>
AuthorDate: Wed Nov 18 22:20:25 2020 -0800

    IMPALA-8990: Fix flakiness in test_set_request_pool
    
    This patch fixes flakiness in test_set_request_pool where one of the
    test cases expects a query to already be accounted for in a resource
    pool but sometimes gets into a state where it runs before the
    previous query passes admission control. This fixes the issue by
    waiting for the previous query to clear admission control before
    attempting to run the aforementioned failing query.
    
    Testing:
    - Ran test locally in a loop for an hour to flush out flakiness.
    
    Change-Id: Ife06509e936443579ca60780013ce01352c8932e
    Reviewed-on: http://gerrit.cloudera.org:8080/16749
    Reviewed-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
    Tested-by: Impala Public Jenkins <impala-public-jenk...@cloudera.com>
---
 tests/custom_cluster/test_admission_controller.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tests/custom_cluster/test_admission_controller.py 
b/tests/custom_cluster/test_admission_controller.py
index c7448fe..64521da 100644
--- a/tests/custom_cluster/test_admission_controller.py
+++ b/tests/custom_cluster/test_admission_controller.py
@@ -324,6 +324,8 @@ class TestAdmissionController(TestAdmissionControllerBase, 
HS2TestSuite):
       # second concurrent query should time out quickly.
       client.set_configuration({'request_pool': 'root.queueA'})
       handle = client.execute_async("select sleep(1000)")
+      # Wait for query to clear admission control and get accounted for
+      client.wait_for_admission_control(handle)
       self.__check_pool_rejected(client, 'root.queueA', "exceeded timeout")
       assert client.get_state(handle) == client.QUERY_STATES['FINISHED']
       # queueA has default query options mem_limit=128m,query_timeout_s=5

Reply via email to