Skip to content

Commit

Permalink
Add waiting timeout while creating mv and row count report. (#31944) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
Jibing-Li authored Mar 7, 2024
1 parent 7a0e89b commit 45cbbe9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions regression-test/suites/statistics/test_analyze_mv.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
suite("test_analyze_mv") {

def wait_mv_finish = { db, table ->
while(true) {
for (int loop = 0; loop < 300; loop++) {
Thread.sleep(1000)
boolean finished = true;
def result = sql """SHOW ALTER TABLE MATERIALIZED VIEW FROM ${db} WHERE tableName="${table}";"""
Expand All @@ -29,9 +29,10 @@ suite("test_analyze_mv") {
}
}
if (finished) {
break;
return;
}
}
throw new Exception("Wait mv finish timeout.")
}

def wait_row_count_reported = { db, table, expected ->
Expand Down Expand Up @@ -66,7 +67,7 @@ suite("test_analyze_mv") {
}

def wait_analyze_finish = { table ->
while(true) {
for (int loop = 0; loop < 300; loop++) {
Thread.sleep(1000)
boolean finished = true;
def result = sql """SHOW ANALYZE ${table};"""
Expand All @@ -82,9 +83,10 @@ suite("test_analyze_mv") {
}
}
if (finished) {
break;
return;
}
}
throw new Exception("Wait analyze finish timeout.")
}

def verify_column_stats = { all_column_result, one_column_result ->
Expand Down

0 comments on commit 45cbbe9

Please sign in to comment.