You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by en...@apache.org on 2023/06/02 13:25:35 UTC
[doris] branch master updated: [Bug](schema-change) make test_dup_mv_schema_change more stable #20379
This is an automated email from the ASF dual-hosted git repository.
englefly pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/doris.git
The following commit(s) were added to refs/heads/master by this push:
new c2e96c7fa6 [Bug](schema-change) make test_dup_mv_schema_change more stable #20379
c2e96c7fa6 is described below
commit c2e96c7fa63c046afb7aea10821ac70f72116fa1
Author: Pxl <px...@qq.com>
AuthorDate: Fri Jun 2 21:25:27 2023 +0800
[Bug](schema-change) make test_dup_mv_schema_change more stable #20379
make test_dup_mv_schema_change more stable
---
.../schema_change_p0/test_dup_mv_schema_change.groovy | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
diff --git a/regression-test/suites/schema_change_p0/test_dup_mv_schema_change.groovy b/regression-test/suites/schema_change_p0/test_dup_mv_schema_change.groovy
index 2f5e3e0171..ad510d698e 100644
--- a/regression-test/suites/schema_change_p0/test_dup_mv_schema_change.groovy
+++ b/regression-test/suites/schema_change_p0/test_dup_mv_schema_change.groovy
@@ -23,13 +23,10 @@ suite ("test_dup_mv_schema_change") {
def jobStateResult = sql """ SHOW ALTER TABLE COLUMN WHERE IndexName='${tbName}' ORDER BY createtime DESC LIMIT 1 """
return jobStateResult[0][9]
}
- def getMVJobState = { tbName ->
- def jobStateResult = sql """ SHOW ALTER TABLE MATERIALIZED VIEW WHERE TableName='${tbName}' ORDER BY CreateTime DESC LIMIT 1 """
- return jobStateResult[0][8]
- }
+
def waitForJob = (tbName, timeout) -> {
while (timeout--){
- String result = getMVJobState(tbName)
+ String result = getJobState(tbName)
if (result == "FINISHED") {
sleep(3000)
break
@@ -92,17 +89,13 @@ suite ("test_dup_mv_schema_change") {
"""
//add materialized view
- def mvName = "mv1"
- sql "create materialized view ${mvName} as select date, user_id, city, age from ${tableName};"
- waitForJob(tableName, 3000)
+ createMV("create materialized view mv1 as select date, user_id, city, age from ${tableName};")
// alter and test light schema change
sql """ALTER TABLE ${tableName} SET ("light_schema_change" = "true");"""
//add materialized view
- def mvName2 = "mv2"
- sql "create materialized view ${mvName2} as select date, user_id, city, age, cost from ${tableName};"
- waitForJob(tableName, 3000)
+ createMV("create materialized view mv2 as select date, user_id, city, age, cost from ${tableName};")
sql """ INSERT INTO ${tableName} VALUES
(2, '2017-10-01', 'Beijing', 10, 1, '2020-01-02', '2020-01-02', '2020-01-02', 1, 31, 21)
@@ -119,6 +112,7 @@ suite ("test_dup_mv_schema_change") {
sql """
ALTER table ${tableName} ADD COLUMN new_column INT default "1"
"""
+ waitForJob(tableName, 3000)
sql """ SELECT * FROM ${tableName} WHERE user_id=2 order by min_dwell_time """
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org