Skip to content

Commit

Permalink
[fix](p0)Fix case timeout. (#40788) (#40840)
Browse files Browse the repository at this point in the history
backport: #40788
  • Loading branch information
Jibing-Li authored Sep 14, 2024
1 parent f16615a commit 6ab8a7e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
23 changes: 15 additions & 8 deletions regression-test/suites/statistics/test_analyze_mtmv.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,21 @@ suite("test_analyze_mtmv") {
l_partkey,
l_suppkey;
"""
sql """REFRESH MATERIALIZED VIEW mv1 AUTO"""
while(true) {
Thread.sleep(1000)
def result = sql """select * from mv_infos("database"="test_analyze_mtmv") where Name="mv1";"""
if (result[0][5] == "SUCCESS") {
break;
}
}
sql """REFRESH MATERIALIZED VIEW mv1 AUTO"""
boolean refreshed = false;
for (int i = 0; i < 300; i++) {
Thread.sleep(1000)
def result = sql """select * from mv_infos("database"="test_analyze_mtmv") where Name="mv1";"""
logger.info("refresh mv info:" + result)
if (result[0][5] == "SUCCESS") {
refreshed = true;
break;
}
if (result[0][5] == "FAIL") {
throw new Exception("Refresh mv failed.")
}
}
assertTrue(refreshed)

def dup_sql1 = """select * from mv1 order by l_shipdate;"""
qt_sql1 dup_sql1
Expand Down
1 change: 1 addition & 0 deletions regression-test/suites/statistics/test_analyze_mv.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ suite("test_analyze_mv") {
sql """drop database if exists test_analyze_mv"""
sql """create database test_analyze_mv"""
sql """use test_analyze_mv"""
sql """set global enable_auto_analyze=false"""

sql """CREATE TABLE mvTestDup (
key1 bigint NOT NULL,
Expand Down

0 comments on commit 6ab8a7e

Please sign in to comment.