mirror of
https://github.com/apache/impala.git
synced 2025-12-25 02:03:09 -05:00
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 <riza.suminto@cloudera.com> Tested-by: Riza Suminto <riza.suminto@cloudera.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user