Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add mtmv case #84

Merged
merged 1 commit into from
May 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions regression-test/suites/db-sync/test_db_sync.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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"
Expand Down
Loading