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

dataroaring pushed a commit to branch branch-3.0
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-3.0 by this push:
     new 329b2995e27 branch-3.0: [fix](regression)Fix test analyze mv case. 
#50701 (#50731)
329b2995e27 is described below

commit 329b2995e272d2d9c5be11b8cebe3bfc717df9f6
Author: github-actions[bot] 
<41898282+github-actions[bot]@users.noreply.github.com>
AuthorDate: Fri May 9 16:42:16 2025 +0800

    branch-3.0: [fix](regression)Fix test analyze mv case. #50701 (#50731)
    
    Cherry-picked from #50701
    
    Co-authored-by: James <lijib...@selectdb.com>
---
 regression-test/suites/statistics/test_analyze_mv.groovy | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/regression-test/suites/statistics/test_analyze_mv.groovy 
b/regression-test/suites/statistics/test_analyze_mv.groovy
index aafac346f5a..d6de18fe5a1 100644
--- a/regression-test/suites/statistics/test_analyze_mv.groovy
+++ b/regression-test/suites/statistics/test_analyze_mv.groovy
@@ -63,7 +63,18 @@ suite("test_analyze_mv") {
             }
             throw new Exception("Row count report timeout.")
         }
+    }
 
+    def wait_local_row_count_reported = {table, index, row, column, expected ->
+        for (int i = 0; i < 120; i++) {
+            def result_row = sql """show index stats ${table} ${index}"""
+            logger.info("show index stats: " + result_row)
+            if (result_row[row][column] == expected) {
+                return;
+            }
+            Thread.sleep(5000)
+        }
+        throw new Exception("Row count report timeout.")
     }
 
     def wait_analyze_finish = { table ->
@@ -513,6 +524,10 @@ suite("test_analyze_mv") {
         logger.info(e.getMessage());
         return;
     }
+    wait_local_row_count_reported("mvTestDup", "mvTestDup", 0, 4, "6")
+    wait_local_row_count_reported("mvTestDup", "mv1", 0, 4, "6")
+    wait_local_row_count_reported("mvTestDup", "mv2", 0, 4, "6")
+    wait_local_row_count_reported("mvTestDup", "mv3", 0, 4, "4")
 
     // Test row count report and report for nereids
     result_row = sql """show index stats mvTestDup mvTestDup"""
@@ -725,6 +740,7 @@ suite("test_analyze_mv") {
     assertEquals("0", result_row[0][4])
 
     // ** Embedded test for skip auto analyze when table is empty again
+    wait_row_count_reported("test_analyze_mv", "mvTestDup", 0, 4, "0")
     sql """analyze table mvTestDup properties ("use.auto.analyzer" = "true")"""
     empty_test = sql """show auto analyze mvTestDup"""
     assertEquals(0, empty_test.size())


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org
For additional commands, e-mail: commits-h...@doris.apache.org

Reply via email to