This is an automated email from the ASF dual-hosted git repository. michaelsmith pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit db0387c9427ee4f2902a6ab07b5c7a7429166982 Author: Michael Smith <[email protected]> AuthorDate: Wed Oct 30 11:38:20 2024 -0700 IMPALA-12769: Wait for query cancellation in webserver test Waits for query cancellation in web cancellation with exception tests as cancellation may not be finalized when the cancel and fetch APIs return in slow environments (such as ASAN) Testing: passed 500 iterations with ASAN. Change-Id: I90a27b3474f7deab3f856e036913ea366936e805 Reviewed-on: http://gerrit.cloudera.org:8080/22005 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Michael Smith <[email protected]> --- tests/webserver/test_web_pages.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/webserver/test_web_pages.py b/tests/webserver/test_web_pages.py index cf260e452..bab44c5f8 100644 --- a/tests/webserver/test_web_pages.py +++ b/tests/webserver/test_web_pages.py @@ -1117,8 +1117,10 @@ class TestWebPage(ImpalaTestSuite): except Exception as e: re.match("UDF ERROR: Cannot divide decimal by zero", str(e)) - # Failed query should be completed. - response_json = self.get_queries() + # Cancel and fetch requests can return before cancellation is finalized. Retry for + # slow environments like ASAN. + response_json = self.try_until("query failure", self.get_queries, + lambda resp: resp['num_in_flight_queries'] == 0) assert response_json['num_in_flight_queries'] == 0 assert response_json['num_waiting_queries'] == 0
