diff --git a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy index 1ebe87c72ac44a6..be43fce548f9ff7 100644 --- a/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy +++ b/regression-test/framework/src/main/groovy/org/apache/doris/regression/suite/Suite.groovy @@ -875,5 +875,26 @@ class Suite implements GroovyInterceptable { } return result.last().get(0); } + + void waiteCreateTableFinished(String tableName) { + Thread.sleep(2000); + String showCreateTable = "SHOW CREATE TABLE ${tableName}" + String createdTableName = ""; + List> result + long startTime = System.currentTimeMillis() + long timeoutTimestamp = startTime + 1 * 60 * 1000 // 1 min + do { + result = sql(showCreateTable) + if (!result.isEmpty()) { + createdTableName = result.last().get(0) + } + logger.info("create table result of ${showCreateTable} is ${createdTableName}") + Thread.sleep(500); + } while (timeoutTimestamp > System.currentTimeMillis() && createdTableName.isEmpty()) + if (createdTableName.isEmpty()) { + logger.info("create table is not success") + } + Assert.assertEquals(true, !createdTableName.isEmpty()) + } } diff --git a/regression-test/suites/nereids_rules_p0/mv/aggregate_with_roll_up.groovy b/regression-test/suites/nereids_rules_p0/mv/aggregate_with_roll_up.groovy index f59dc0440e7015e..ff79e93196cd995 100644 --- a/regression-test/suites/nereids_rules_p0/mv/aggregate_with_roll_up.groovy +++ b/regression-test/suites/nereids_rules_p0/mv/aggregate_with_roll_up.groovy @@ -95,14 +95,17 @@ suite("aggregate_with_roll_up") { ) """ + waiteCreateTableFinished("lineitem") sql """ insert into lineitem values (1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-08', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy'), (2, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-12-11', '2023-12-12', '2023-12-13', 'c', 'd', 'xxxxxxxxx');""" + waiteCreateTableFinished("orders") sql """ insert into orders values (1, 1, 'ok', 99.5, '2023-12-08', 'a', 'b', 1, 'yy'), (2, 2, 'ok', 109.2, '2023-12-09', 'c','d',2, 'mm'); """ + waiteCreateTableFinished("partsupp") sql """ insert into partsupp values (2, 3, 9, 10.01, 'supply1'), (2, 3, 10, 11.01, 'supply2'); diff --git a/regression-test/suites/nereids_rules_p0/mv/aggregate_without_roll_up.groovy b/regression-test/suites/nereids_rules_p0/mv/aggregate_without_roll_up.groovy index 8366d477028f9e0..e4aa9969d1b995d 100644 --- a/regression-test/suites/nereids_rules_p0/mv/aggregate_without_roll_up.groovy +++ b/regression-test/suites/nereids_rules_p0/mv/aggregate_without_roll_up.groovy @@ -95,14 +95,16 @@ suite("aggregate_without_roll_up") { ) """ + waiteCreateTableFinished("lineitem"); sql """ insert into lineitem values (1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-08', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy'), (2, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-12-11', '2023-12-12', '2023-12-13', 'c', 'd', 'xxxxxxxxx');""" + waiteCreateTableFinished("orders"); sql """ insert into orders values (1, 1, 'ok', 99.5, '2023-12-08', 'a', 'b', 1, 'yy'), (2, 2, 'ok', 109.2, '2023-12-09', 'c','d',2, 'mm'); """ - + waiteCreateTableFinished("partsupp"); sql """ insert into partsupp values (2, 3, 9, 10.01, 'supply1'), (2, 3, 10, 11.01, 'supply2'); diff --git a/regression-test/suites/nereids_rules_p0/mv/inner_join.groovy b/regression-test/suites/nereids_rules_p0/mv/inner_join.groovy index 0acc9f39a4dd8b4..dcff69b8ed303c7 100644 --- a/regression-test/suites/nereids_rules_p0/mv/inner_join.groovy +++ b/regression-test/suites/nereids_rules_p0/mv/inner_join.groovy @@ -95,14 +95,17 @@ suite("inner_join") { ) """ + waiteCreateTableFinished("lineitem") sql """ insert into lineitem values (1, 2, 3, 4, 5.5, 6.5, 7.5, 8.5, 'o', 'k', '2023-12-08', '2023-12-09', '2023-12-10', 'a', 'b', 'yyyyyyyyy'), (2, 2, 3, 6, 7.5, 8.5, 9.5, 10.5, 'k', 'o', '2023-12-11', '2023-12-12', '2023-12-13', 'c', 'd', 'xxxxxxxxx');""" + waiteCreateTableFinished("orders") sql """ insert into orders values (1, 1, 'ok', 99.5, '2023-12-08', 'a', 'b', 1, 'yy'), (2, 2, 'ok', 109.2, '2023-12-09', 'c','d',2, 'mm'); """ + waiteCreateTableFinished("partsupp") sql """ insert into partsupp values (2, 3, 9, 10.01, 'supply1'), (2, 3, 10, 11.01, 'supply2');