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


The following commit(s) were added to refs/heads/branch-2.1 by this push:
     new f0ce208e686 [fix](test) Create mv but not check finished (#52167)
f0ce208e686 is described below

commit f0ce208e6868ac10927fcb0492d3735bd9bc4ed6
Author: Uniqueyou <[email protected]>
AuthorDate: Sat Jun 28 09:48:44 2025 +0800

    [fix](test) Create mv but not check finished (#52167)
---
 .../backup_restore/test_backup_restore_mv_write.groovy | 18 +++++++++++++++++-
 1 file changed, 17 insertions(+), 1 deletion(-)

diff --git 
a/regression-test/suites/backup_restore/test_backup_restore_mv_write.groovy 
b/regression-test/suites/backup_restore/test_backup_restore_mv_write.groovy
index a275043cb51..1fb88f026b1 100644
--- a/regression-test/suites/backup_restore/test_backup_restore_mv_write.groovy
+++ b/regression-test/suites/backup_restore/test_backup_restore_mv_write.groovy
@@ -59,6 +59,22 @@ suite("test_backup_restore_mv_write", "backup_restore") {
             vin
     """
 
+    def alter_finished = false
+    for (int i = 0; i < 60 && !alter_finished; i++) {
+        def result = sql_return_maparray "SHOW ALTER TABLE MATERIALIZED VIEW 
FROM ${dbName}"
+        logger.info("result: ${result}")
+        for (int j = 0; j < result.size(); j++) {
+            if (result[j]['TableName'] == "${tableNamePrefix}" &&
+                result[j]['RollupIndexName'] == "${viewName}" &&
+                result[j]['State'] == 'FINISHED') {
+                alter_finished = true
+                break
+            }
+        }
+        Thread.sleep(3000)
+    }
+    assertTrue(alter_finished);
+
     sql """
         BACKUP SNAPSHOT ${snapshotName}
         TO `${repoName}`
@@ -105,7 +121,7 @@ suite("test_backup_restore_mv_write", "backup_restore") {
     // DefineExpr: date_format(hours_add(`k2`, 1), '%Y-%m-%d %H:00:00')
     // WhereClause: (`k1` > '2025-06-12 00:00:00')
 
-    assertTrue(res0.toString() == res.toString())
+    assertEquals(res0.toString(), res.toString())
 
     sql "insert into ${tableNamePrefix} values (1, '2025-06-12 01:00:00', 
'2025-06-12 02:00:00', 'test_vin_0')"
     sql "insert into ${tableNamePrefix} values (2, '2025-06-13 02:00:00', 
'2025-06-13 03:00:00', 'test_vin_1')"


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to