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 447c016ae18bd89902ff8ac2cd3a5298360c0d50 Author: Sai Hemanth Gantasala <[email protected]> AuthorDate: Tue Nov 26 17:24:04 2024 -0800 IMPALA-12187: Fix flaky test_event_based_replication() TestEventProcessing.test_event_based_replication is turning flaky when there is a lag replication of a database that has too many events to replicate. The case III in the test is turning flaky because the event processor has to processes so many ALTER_PARTITIONS events that valid writeId list can be inaccurate when the replication is not complete. So a 20 sec timeout is introduced in case III after replication so that event processor will process events after replication process is completely done. Testing: - Looped the test 100 times to avoid flakiness Change-Id: I89fcd951f6a65ab7fe97c4f23554d93d9ba12f4e Reviewed-on: http://gerrit.cloudera.org:8080/22131 Reviewed-by: Impala Public Jenkins <[email protected]> Tested-by: Riza Suminto <[email protected]> --- tests/metadata/test_event_processing_base.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/metadata/test_event_processing_base.py b/tests/metadata/test_event_processing_base.py index baafd5358..d2199e418 100644 --- a/tests/metadata/test_event_processing_base.py +++ b/tests/metadata/test_event_processing_base.py @@ -17,6 +17,7 @@ from __future__ import absolute_import, division, print_function from tests.common.impala_test_suite import ImpalaTestSuite +from tests.util.event_processor_utils import EventProcessorUtils EVENT_SYNC_QUERY_OPTIONS = { "sync_hms_events_wait_time_s": 10, @@ -244,6 +245,9 @@ class TestEventProcessingBase(ImpalaTestSuite): # replicate the table from source to target cls.run_stmt_in_hive("repl load {0} into {1}".format(source_db, target_db)) + # we wait (20sec) until the events catch up in case repl command above did some HMS + # operations. + EventProcessorUtils.wait_for_event_processing(suite, timeout=20) # confirm the number of rows in target match with the source table. rows_in_unpart_tbl_target = int(cls.execute_scalar_expect_success(impala_client, "select count(*) from {0}.{1}".format(target_db, unpartitioned_tbl))
