This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit e9c16385076c87d2d364a51b1c64b96cb079f1a8 Author: Jibing-Li <[email protected]> AuthorDate: Thu Mar 7 22:47:31 2024 +0800 Add waiting timeout while creating mv and row count report. (#31944) --- regression-test/suites/statistics/test_analyze_mv.groovy | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/regression-test/suites/statistics/test_analyze_mv.groovy b/regression-test/suites/statistics/test_analyze_mv.groovy index 7295b3e3a0e..635837e6c16 100644 --- a/regression-test/suites/statistics/test_analyze_mv.groovy +++ b/regression-test/suites/statistics/test_analyze_mv.groovy @@ -18,7 +18,7 @@ suite("test_analyze_mv") { def wait_mv_finish = { db, table -> - while(true) { + for (int loop = 0; loop < 300; loop++) { Thread.sleep(1000) boolean finished = true; def result = sql """SHOW ALTER TABLE MATERIALIZED VIEW FROM ${db} WHERE tableName="${table}";""" @@ -29,9 +29,10 @@ suite("test_analyze_mv") { } } if (finished) { - break; + return; } } + throw new Exception("Wait mv finish timeout.") } def wait_row_count_reported = { db, table, expected -> @@ -66,7 +67,7 @@ suite("test_analyze_mv") { } def wait_analyze_finish = { table -> - while(true) { + for (int loop = 0; loop < 300; loop++) { Thread.sleep(1000) boolean finished = true; def result = sql """SHOW ANALYZE ${table};""" @@ -82,9 +83,10 @@ suite("test_analyze_mv") { } } if (finished) { - break; + return; } } + throw new Exception("Wait analyze finish timeout.") } def verify_column_stats = { all_column_result, one_column_result -> --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
