From 3c8f9f7dad57199391090632bacb0ef9da76aaf1 Mon Sep 17 00:00:00 2001 From: Jibing-Li <64681310+Jibing-Li@users.noreply.github.com> Date: Fri, 13 Sep 2024 16:10:13 +0800 Subject: [PATCH] [fix](p0)Fix case timeout. (#40788) Fix case timeout. --- .../suites/statistics/test_analyze_mtmv.groovy | 9 ++++++++- regression-test/suites/statistics/test_analyze_mv.groovy | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/regression-test/suites/statistics/test_analyze_mtmv.groovy b/regression-test/suites/statistics/test_analyze_mtmv.groovy index 9825ba455c7fe6..49e1b75a476dbb 100644 --- a/regression-test/suites/statistics/test_analyze_mtmv.groovy +++ b/regression-test/suites/statistics/test_analyze_mtmv.groovy @@ -270,13 +270,20 @@ suite("test_analyze_mtmv") { l_suppkey; """ sql """REFRESH MATERIALIZED VIEW mv1 AUTO""" - while(true) { + 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 diff --git a/regression-test/suites/statistics/test_analyze_mv.groovy b/regression-test/suites/statistics/test_analyze_mv.groovy index d6ee9b4cfc7c14..2d7b4aaea7d462 100644 --- a/regression-test/suites/statistics/test_analyze_mv.groovy +++ b/regression-test/suites/statistics/test_analyze_mv.groovy @@ -112,6 +112,7 @@ suite("test_analyze_mv") { sql """create database test_analyze_mv""" sql """use test_analyze_mv""" sql """set global force_sample_analyze=false""" + sql """set global enable_auto_analyze=false""" sql """CREATE TABLE mvTestDup ( key1 bigint NOT NULL,