From 8b0c8392392c80880a45f5b40a1a9f4c35d66720 Mon Sep 17 00:00:00 2001 From: lsy3993 <110876560+lsy3993@users.noreply.github.com> Date: Thu, 23 May 2024 14:06:06 +0800 Subject: [PATCH] add mtmv case (#84) --- regression-test/suites/db-sync/test_db_sync.groovy | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/regression-test/suites/db-sync/test_db_sync.groovy b/regression-test/suites/db-sync/test_db_sync.groovy index c53612ad..7cd9364c 100644 --- a/regression-test/suites/db-sync/test_db_sync.groovy +++ b/regression-test/suites/db-sync/test_db_sync.groovy @@ -181,6 +181,17 @@ suite("test_db_sync") { """ } + logger.info("=== Test : mtmv create ===") + sql "CREATE MATERIALIZED VIEW mv1 + BUILD IMMEDIATE REFRESH AUTO ON SCHEDULE EVERY 1 hour + DISTRIBUTED BY RANDOM BUCKETS 3 + PROPERTIES ('replication_num' = '1') + AS + SELECT t1.test, t2.last + FROM (SELECT * FROM ${tableUnique0} where id > 1) t1 + LEFT OUTER JOIN ${tableAggregate0} as t2 + ON t1.test = t2.test" + sql "ALTER DATABASE ${context.dbName} SET properties (\"binlog.enable\" = \"true\")" String response @@ -300,6 +311,9 @@ suite("test_db_sync") { assertTrue(checkShowTimesOf("SHOW TABLES LIKE '${keywordTableName}'", notExist, 30, "target")) + logger.info("=== Test : query mtmv case ===") + assertTrue(checkSelectTimesOf("SELECT * FROM mv1", 3, 45)) + logger.info("=== Test 4: pause and resume ===") httpTest { uri "/pause"