This is an automated email from the ASF dual-hosted git repository. jasonmfehr pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/impala.git
commit 42e448875b8359a9d6dda9f9c8494db9cbe5a628 Author: Riza Suminto <[email protected]> AuthorDate: Fri Aug 29 12:57:18 2025 -0700 IMPALA-13731: Deflake TestAsyncLoadData.test_async_load This patch attempt to deflake TestAsyncLoadData::test_async_load by allowing exec_end_state == PENDING if enable_async_load_data. This is OK because, if enable_async_load_data is true, async_exec_thread_ might be slightly slower to start and transition the query to RUNNING. wait_time is also relaxed to at least 2 seconds because wait_start not strictly starts at the point when the async_exec_thread_ starts. This patch does not change assertion / behavior in sync code path (enable_async_ddl_execution=false). Testing: Loop and pass TestAsyncLoadData 50 times. Change-Id: I8776a432e60a1167ad54778e81046421df15cf37 Reviewed-on: http://gerrit.cloudera.org:8080/23360 Reviewed-by: Michael Smith <[email protected]> Reviewed-by: Jason Fehr <[email protected]> Tested-by: Impala Public Jenkins <[email protected]> --- tests/metadata/test_load.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/tests/metadata/test_load.py b/tests/metadata/test_load.py index 729eb7ba8..688e2d5ae 100644 --- a/tests/metadata/test_load.py +++ b/tests/metadata/test_load.py @@ -21,7 +21,7 @@ from __future__ import absolute_import, division, print_function from builtins import range import time from copy import deepcopy -from tests.common.impala_connection import FINISHED, RUNNING +from tests.common.impala_connection import FINISHED, PENDING, RUNNING from tests.common.impala_test_suite import ImpalaTestSuite from tests.common.test_dimensions import ( create_client_protocol_dimension, @@ -220,10 +220,11 @@ class TestAsyncLoadData(ImpalaTestSuite): if enable_async_load_data: # In async mode: # The compilation of LOAD is processed in the exec step without delay. And the - # processing of the LOAD plan is in wait step with delay. The wait time should - # definitely take more time than 3 seconds. - assert (exec_end_state == RUNNING) - assert (wait_time >= 3) + # processing of the LOAD plan is in wait step with delay. Relax the wait time + # to at least 2 seconds because wait_start not strictly starts at the point + # when the async_exec_thread_ starts. + assert (exec_end_state == PENDING or exec_end_state == RUNNING) + assert (wait_time > 2) else: # In sync mode: # The entire LOAD is processed in the exec step with delay. exec_time should be
