This is an automated email from the ASF dual-hosted git repository.
starocean999 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 a67429de1e5 [fix](nereids)fix unstable test case (#39244)
a67429de1e5 is described below
commit a67429de1e5772140f1493b461a207cb414dc2b1
Author: starocean999 <[email protected]>
AuthorDate: Thu Aug 15 09:49:19 2024 +0800
[fix](nereids)fix unstable test case (#39244)
---
.../suites/nereids_syntax_p0/rollup/date.groovy | 53 ++--------------------
1 file changed, 4 insertions(+), 49 deletions(-)
diff --git a/regression-test/suites/nereids_syntax_p0/rollup/date.groovy
b/regression-test/suites/nereids_syntax_p0/rollup/date.groovy
index 4fdcd4f2c83..c91c219c5f9 100644
--- a/regression-test/suites/nereids_syntax_p0/rollup/date.groovy
+++ b/regression-test/suites/nereids_syntax_p0/rollup/date.groovy
@@ -15,7 +15,6 @@
// specific language governing permissions and limitations
// under the License.
import java.util.concurrent.TimeUnit
-import org.awaitility.Awaitility
suite("date", "rollup") {
@@ -24,10 +23,6 @@ suite("date", "rollup") {
def tbName1 = "test_materialized_view_date1"
- def getJobState = { tableName ->
- def jobStateResult = sql """ SHOW ALTER TABLE MATERIALIZED VIEW WHERE
TableName='${tableName}' ORDER BY CreateTime DESC LIMIT 1; """
- return jobStateResult[0][8]
- }
sql "DROP TABLE IF EXISTS ${tbName1}"
sql """
CREATE TABLE IF NOT EXISTS ${tbName1}(
@@ -44,51 +39,11 @@ suite("date", "rollup") {
DISTRIBUTED BY HASH(record_id) properties("replication_num" = "1");
"""
- int max_try_secs = 120
- sql "CREATE materialized VIEW amt_max1 AS SELECT store_id, max(sale_date1)
FROM ${tbName1} GROUP BY store_id;"
- String res = "NOT_FINISHED"
- Awaitility.await().atMost(max_try_secs,
TimeUnit.SECONDS).with().pollDelay(100, TimeUnit.MILLISECONDS).await().until(()
-> {
- res = getJobState(tbName1)
- if (res == "FINISHED" || res == "CANCELLED") {
- assertEquals("FINISHED", res)
- return true;
- }
- return false;
- });
- assertEquals("FINISHED",res)
-
- sql "CREATE materialized VIEW amt_max2 AS SELECT store_id,
max(sale_datetime1) FROM ${tbName1} GROUP BY store_id;"
- Awaitility.await().atMost(max_try_secs,
TimeUnit.SECONDS).with().pollDelay(100, TimeUnit.MILLISECONDS).await().until(()
-> {
- res = getJobState(tbName1)
- if (res == "FINISHED" || res == "CANCELLED") {
- assertEquals("FINISHED", res)
- return true;
- }
- return false;
- });
- assertEquals("FINISHED",res)
-
- sql "CREATE materialized VIEW amt_max3 AS SELECT store_id,
max(sale_datetime2) FROM ${tbName1} GROUP BY store_id;"
- Awaitility.await().atMost(max_try_secs,
TimeUnit.SECONDS).with().pollDelay(100, TimeUnit.MILLISECONDS).await().until(()
-> {
- res = getJobState(tbName1)
- if (res == "FINISHED" || res == "CANCELLED") {
- assertEquals("FINISHED", res)
- return true;
- }
- return false;
- });
- assertEquals("FINISHED",res)
+ createMV("CREATE materialized VIEW amt_max1 AS SELECT store_id,
max(sale_date1) FROM ${tbName1} GROUP BY store_id;")
+ createMV("CREATE materialized VIEW amt_max2 AS SELECT store_id,
max(sale_datetime1) FROM ${tbName1} GROUP BY store_id;")
+ createMV("CREATE materialized VIEW amt_max3 AS SELECT store_id,
max(sale_datetime2) FROM ${tbName1} GROUP BY store_id;")
+ createMV("CREATE materialized VIEW amt_max4 AS SELECT store_id,
max(sale_datetime3) FROM ${tbName1} GROUP BY store_id;")
- sql "CREATE materialized VIEW amt_max4 AS SELECT store_id,
max(sale_datetime3) FROM ${tbName1} GROUP BY store_id;"
- Awaitility.await().atMost(max_try_secs,
TimeUnit.SECONDS).with().pollDelay(100, TimeUnit.MILLISECONDS).await().until(()
-> {
- res = getJobState(tbName1)
- if (res == "FINISHED" || res == "CANCELLED") {
- assertEquals("FINISHED", res)
- return true;
- }
- return false;
- });
- assertEquals("FINISHED",res)
sql "SHOW ALTER TABLE MATERIALIZED VIEW WHERE TableName='${tbName1}';"
sql "insert into ${tbName1} values(1, 1, 1, '2020-05-30', '2020-05-30',
'2020-05-30 11:11:11.111111', '2020-05-30 11:11:11.111111', '2020-05-30
11:11:11.111111',100);"
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]