This is an automated email from the ASF dual-hosted git repository.

lijibing pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/master by this push:
     new a5e87dca164 Add waiting timeout while creating mv and row count 
report. (#31944)
a5e87dca164 is described below

commit a5e87dca1642c1c3acb09d483540fb41181aca2b
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]

Reply via email to