From dbf2326f629aead9cd03c6cc5be315fab4220cda Mon Sep 17 00:00:00 2001 From: yiguolei <676222867@qq.com> Date: Mon, 8 Apr 2024 23:05:28 +0800 Subject: [PATCH] [regression-test](case) fix unstable test case in multi fe env (#33385) * [regression-test](case) fix unstable test case in multi fe env --------- Co-authored-by: yiguolei --- .../suites/demo_p0/streamLoad_action.groovy | 4 ++-- .../stream_load/test_stream_load_new.groovy | 21 ++++++++++--------- .../test_stream_load_new_move_memtable.groovy | 11 ++++++++++ .../test_update_on_current_timestamp.groovy | 3 +++ 4 files changed, 27 insertions(+), 12 deletions(-) diff --git a/regression-test/suites/demo_p0/streamLoad_action.groovy b/regression-test/suites/demo_p0/streamLoad_action.groovy index 69b71f9c3c..733483517d 100644 --- a/regression-test/suites/demo_p0/streamLoad_action.groovy +++ b/regression-test/suites/demo_p0/streamLoad_action.groovy @@ -97,7 +97,7 @@ suite("streamLoad_action") { assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) } } - + sql """ sync; """ order_qt_select_2 "SELECT * FROM ${tableName}" // to test merge sort @@ -112,7 +112,7 @@ suite("streamLoad_action") { """ sql " INSERT INTO B values (1);" - + sql """ sync; """ qt_sql """ SELECT subq_0.`c1` AS c1 FROM diff --git a/regression-test/suites/load_p0/stream_load/test_stream_load_new.groovy b/regression-test/suites/load_p0/stream_load/test_stream_load_new.groovy index 9ae590e55e..7df57ebbd1 100644 --- a/regression-test/suites/load_p0/stream_load/test_stream_load_new.groovy +++ b/regression-test/suites/load_p0/stream_load/test_stream_load_new.groovy @@ -55,7 +55,7 @@ suite("test_stream_load_new", "p0") { assertEquals(0, json.NumberFilteredRows) } } - + sql """ sync; """ qt_sql1 "select id, name from ${tableName1}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName1}" @@ -98,6 +98,7 @@ suite("test_stream_load_new", "p0") { } } + sql """ sync; """ qt_sql2 "select * from ${tableName2}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName2}" @@ -138,7 +139,7 @@ suite("test_stream_load_new", "p0") { assertEquals(0, json.NumberFilteredRows) } } - + sql """ sync; """ qt_sql3 "select * from ${tableName3}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName3}" @@ -215,7 +216,7 @@ suite("test_stream_load_new", "p0") { assertEquals(0, json.NumberFilteredRows) } } - + sql """ sync; """ qt_sql5 "select * from ${tableName5}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName5}" @@ -266,7 +267,7 @@ suite("test_stream_load_new", "p0") { assertEquals(0, json.NumberFilteredRows) } } - + sql """ sync; """ qt_sql6 "select * from ${tableName6}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName6}" @@ -311,7 +312,7 @@ suite("test_stream_load_new", "p0") { assertEquals(0, json.NumberFilteredRows) } } - + sql """ sync; """ qt_sql7 "select * from ${tableName7}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName7}" @@ -356,7 +357,7 @@ suite("test_stream_load_new", "p0") { assertEquals(0, json.NumberFilteredRows) } } - + sql """ sync; """ qt_sql8 "select * from ${tableName8}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName8}" @@ -402,7 +403,7 @@ suite("test_stream_load_new", "p0") { assertEquals(0, json.NumberFilteredRows) } } - + sql """ sync; """ qt_sql9 "select * from ${tableName9}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName9}" @@ -449,7 +450,7 @@ suite("test_stream_load_new", "p0") { } } } - + sql """ sync; """ qt_sql10 "select count(*) from ${tableName10}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName10}" @@ -491,7 +492,7 @@ suite("test_stream_load_new", "p0") { assertEquals(0, json.NumberFilteredRows) } } - + sql """ sync; """ qt_sql11 "select id, name from ${tableName11}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName11}" @@ -534,7 +535,7 @@ suite("test_stream_load_new", "p0") { assertEquals(0, json.NumberFilteredRows) } } - + sql """ sync; """ qt_sql12 "select id, name from ${tableName12}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName12}" diff --git a/regression-test/suites/load_p0/stream_load/test_stream_load_new_move_memtable.groovy b/regression-test/suites/load_p0/stream_load/test_stream_load_new_move_memtable.groovy index 1fb43b21c7..a7821d5588 100644 --- a/regression-test/suites/load_p0/stream_load/test_stream_load_new_move_memtable.groovy +++ b/regression-test/suites/load_p0/stream_load/test_stream_load_new_move_memtable.groovy @@ -59,6 +59,7 @@ suite("test_stream_load_new_move_memtable", "p0") { } } + sql """ sync; """ qt_sql1 "select id, name from ${tableName1}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName1}" @@ -102,6 +103,7 @@ suite("test_stream_load_new_move_memtable", "p0") { } } + sql """ sync; """ qt_sql2 "select * from ${tableName2}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName2}" @@ -144,6 +146,7 @@ suite("test_stream_load_new_move_memtable", "p0") { } } + sql """ sync; """ qt_sql3 "select * from ${tableName3}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName3}" @@ -223,6 +226,7 @@ suite("test_stream_load_new_move_memtable", "p0") { } } + sql """ sync; """ qt_sql5 "select * from ${tableName5}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName5}" @@ -275,6 +279,7 @@ suite("test_stream_load_new_move_memtable", "p0") { } } + sql """ sync; """ qt_sql6 "select * from ${tableName6}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName6}" @@ -321,6 +326,7 @@ suite("test_stream_load_new_move_memtable", "p0") { } } + sql """ sync; """ qt_sql7 "select * from ${tableName7}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName7}" @@ -367,6 +373,7 @@ suite("test_stream_load_new_move_memtable", "p0") { } } + sql """ sync; """ qt_sql8 "select * from ${tableName8}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName8}" @@ -414,6 +421,7 @@ suite("test_stream_load_new_move_memtable", "p0") { } } + sql """ sync; """ qt_sql9 "select * from ${tableName9}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName9}" @@ -462,6 +470,7 @@ suite("test_stream_load_new_move_memtable", "p0") { } } + sql """ sync; """ qt_sql10 "select count(*) from ${tableName10}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName10}" @@ -505,6 +514,7 @@ suite("test_stream_load_new_move_memtable", "p0") { } } + sql """ sync; """ qt_sql11 "select id, name from ${tableName11}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName11}" @@ -549,6 +559,7 @@ suite("test_stream_load_new_move_memtable", "p0") { } } + sql """ sync; """ qt_sql12 "select id, name from ${tableName12}" } finally { try_sql "DROP TABLE IF EXISTS ${tableName12}" diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_update_on_current_timestamp.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_update_on_current_timestamp.groovy index 29f647fb7a..85f4f72127 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_update_on_current_timestamp.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_update_on_current_timestamp.groovy @@ -49,6 +49,7 @@ suite("test_mow_update_on_current_timestamp", "p0") { file 'update_on_current_timestamp1.csv' time 10000 // limit inflight 10s } + sql """ sync; """ qt_sql "select id,name,score,test,dft from ${t1} order by id;" qt_sql "select count(distinct update_time) from ${t1} where update_time > '2023-10-01 00:00:00';" @@ -67,6 +68,7 @@ suite("test_mow_update_on_current_timestamp", "p0") { file 'update_on_current_timestamp2.csv' time 10000 // limit inflight 10s } + sql """ sync; """ qt_sql "select id,name,score,test,dft from ${t1} order by id;" qt_sql "select count(distinct update_time) from ${t1} where update_time > '2023-10-01 00:00:00';" @@ -82,6 +84,7 @@ suite("test_mow_update_on_current_timestamp", "p0") { file 'update_on_current_timestamp3.csv' time 10000 // limit inflight 10s } + sql """ sync; """ qt_sql "select id,name,score,test,dft from ${t1} order by id;" qt_sql "select count(distinct update_time) from ${t1} where update_time > '2023-10-01 00:00:00';" qt_sql "select count(distinct update_time) from ${t1};"