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
The following commit(s) were added to refs/heads/master by this push:
new 99529db6a IMPALA-13639: Wait for prior queries in TestWebPage
99529db6a is described below
commit 99529db6ad62ddc34cbfd924d7e41b1fce5b60a2
Author: Michael Smith <[email protected]>
AuthorDate: Thu Jan 2 16:20:13 2025 -0800
IMPALA-13639: Wait for prior queries in TestWebPage
Waits for prior test queries to complete before starting query
cancellation tests that expect no in-flight queries.
Removes redundant asserts that num_in_flight_queries reached the
expected value, as try_until will fail the test if it times out.
Change-Id: I683d8b25dc0ec40bc2deb7aa11f79c6bc1a837c3
Reviewed-on: http://gerrit.cloudera.org:8080/22292
Reviewed-by: Riza Suminto <[email protected]>
Tested-by: Impala Public Jenkins <[email protected]>
---
tests/webserver/test_web_pages.py | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/tests/webserver/test_web_pages.py
b/tests/webserver/test_web_pages.py
index bab44c5f8..6c5800761 100644
--- a/tests/webserver/test_web_pages.py
+++ b/tests/webserver/test_web_pages.py
@@ -1029,8 +1029,8 @@ class TestWebPage(ImpalaTestSuite):
query = "select count(*) from functional_parquet.alltypes"
delay_created_action = "impalad_load_tables_delay:SLEEP@1000"
- response_json = self.get_queries()
- assert response_json['num_in_flight_queries'] == 0
+ response_json = self.try_until("test baseline", self.get_queries,
+ lambda resp: resp['num_in_flight_queries'] == 0)
# Start the query completely async. The server doesn't return a response
until
# the query has exited the CREATED state, so we need to get the query ID
another way.
@@ -1067,7 +1067,6 @@ class TestWebPage(ImpalaTestSuite):
# environments like ASAN.
response_json = self.try_until("query cancellation", 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
expected_queries = [q for q in response_json['completed_queries']
@@ -1082,8 +1081,8 @@ class TestWebPage(ImpalaTestSuite):
query = "select *, 1.0/0 from functional_parquet.alltypes limit 10"
delay_created_action = "impalad_load_tables_delay:SLEEP@1000"
- response_json = self.get_queries()
- assert response_json['num_in_flight_queries'] == 0
+ response_json = self.try_until("test baseline", self.get_queries,
+ lambda resp: resp['num_in_flight_queries'] == 0)
def run(queue, client, query):
queue.put(client.execute_async(query))
@@ -1121,7 +1120,6 @@ class TestWebPage(ImpalaTestSuite):
# 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
expected_queries = [q for q in response_json['completed_queries']