From 04fa0219c8289618d89bf377dde7eaf6c992d822 Mon Sep 17 00:00:00 2001 From: Jerry Hu Date: Tue, 21 Nov 2023 17:19:41 +0800 Subject: [PATCH] [test](regression) add 'sync' for som stream load --- regression-test/suites/delete_p0/test_delete_where_in.groovy | 3 +++ regression-test/suites/demo_p0/streamLoad_action.groovy | 2 ++ .../suites/export_p0/test_export_empty_table.groovy | 2 ++ regression-test/suites/export_p0/test_export_orc.groovy | 2 ++ .../suites/export_p0/test_outfile_separator.groovy | 2 ++ .../suites/json_p0/test_json_load_and_function.groovy | 2 ++ .../suites/jsonb_p0/test_jsonb_load_and_function.groovy | 2 ++ .../suites/load_p0/stream_load/test_stream_load.groovy | 4 +++- .../partial_update/test_partial_update_seq_col.groovy | 3 +++ 9 files changed, 21 insertions(+), 1 deletion(-) diff --git a/regression-test/suites/delete_p0/test_delete_where_in.groovy b/regression-test/suites/delete_p0/test_delete_where_in.groovy index 449647e37c44a8c..7fac9aacffd39fe 100644 --- a/regression-test/suites/delete_p0/test_delete_where_in.groovy +++ b/regression-test/suites/delete_p0/test_delete_where_in.groovy @@ -69,6 +69,9 @@ suite("test_delete_where_in", "delete_p0") { assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) } } + + sql """ sync; """ + def loadRowCount = sql "select count(*) from ${tb_name};" logger.info("select count(*) from ${loadRowCount};") diff --git a/regression-test/suites/demo_p0/streamLoad_action.groovy b/regression-test/suites/demo_p0/streamLoad_action.groovy index a11aed7a1c52d6e..69b71f9c3c8cb6f 100644 --- a/regression-test/suites/demo_p0/streamLoad_action.groovy +++ b/regression-test/suites/demo_p0/streamLoad_action.groovy @@ -66,6 +66,8 @@ suite("streamLoad_action") { directToBe backendIps.get(backendId), backendHttpPorts.get(backendId) as int } + sql """ sync; """ + order_qt_select_1 "SELECT * FROM ${tableName}" sql "TRUNCATE TABLE ${tableName}" diff --git a/regression-test/suites/export_p0/test_export_empty_table.groovy b/regression-test/suites/export_p0/test_export_empty_table.groovy index 5848f2e98b8d4e6..e891647fe533472 100644 --- a/regression-test/suites/export_p0/test_export_empty_table.groovy +++ b/regression-test/suites/export_p0/test_export_empty_table.groovy @@ -189,6 +189,8 @@ suite("test_export_empty_table", "p0") { } } + sql """ sync; """ + qt_select_load1 """ SELECT * FROM ${table_load_name} t ORDER BY user_id; """ } finally { diff --git a/regression-test/suites/export_p0/test_export_orc.groovy b/regression-test/suites/export_p0/test_export_orc.groovy index ec9ed07d9a8194f..c4c76ae9c23ede5 100644 --- a/regression-test/suites/export_p0/test_export_orc.groovy +++ b/regression-test/suites/export_p0/test_export_orc.groovy @@ -202,6 +202,8 @@ suite("test_export_orc", "p0") { } } + sql """ sync; """ + qt_select_load1 """ SELECT * FROM ${table_load_name} t ORDER BY user_id; """ } finally { diff --git a/regression-test/suites/export_p0/test_outfile_separator.groovy b/regression-test/suites/export_p0/test_outfile_separator.groovy index d0f2efa690be57f..c4d248851565ef3 100644 --- a/regression-test/suites/export_p0/test_outfile_separator.groovy +++ b/regression-test/suites/export_p0/test_outfile_separator.groovy @@ -93,6 +93,8 @@ suite("test_outfile_separator") { time 10000 // limit inflight 10s } + sql """ sync; """ + qt_select_2 """ SELECT * FROM ${tableName} t ORDER BY k1; """ } finally { diff --git a/regression-test/suites/json_p0/test_json_load_and_function.groovy b/regression-test/suites/json_p0/test_json_load_and_function.groovy index 0d8b9804464c195..c79274eec359aae 100644 --- a/regression-test/suites/json_p0/test_json_load_and_function.groovy +++ b/regression-test/suites/json_p0/test_json_load_and_function.groovy @@ -99,6 +99,8 @@ suite("test_json_load_and_function", "p0") { } } + sql """ sync; """ + // check result qt_select "SELECT * FROM ${testTable} ORDER BY id" diff --git a/regression-test/suites/jsonb_p0/test_jsonb_load_and_function.groovy b/regression-test/suites/jsonb_p0/test_jsonb_load_and_function.groovy index 524b89ae6a33b7c..e6a9ca62dc94feb 100644 --- a/regression-test/suites/jsonb_p0/test_jsonb_load_and_function.groovy +++ b/regression-test/suites/jsonb_p0/test_jsonb_load_and_function.groovy @@ -100,6 +100,8 @@ suite("test_jsonb_load_and_function", "p0") { } } + sql """ sync; """ + // check result qt_select "SELECT * FROM ${testTable} ORDER BY id" diff --git a/regression-test/suites/load_p0/stream_load/test_stream_load.groovy b/regression-test/suites/load_p0/stream_load/test_stream_load.groovy index c69449b4dacb38d..32ec89ef4f35e39 100644 --- a/regression-test/suites/load_p0/stream_load/test_stream_load.groovy +++ b/regression-test/suites/load_p0/stream_load/test_stream_load.groovy @@ -121,9 +121,11 @@ suite("test_stream_load", "p0") { assertEquals(1, json.NumberFilteredRows) } } - qt_sql_strict_mode_ratio "select * from ${tableName} order by k1, k2" sql "sync" + + qt_sql_strict_mode_ratio "select * from ${tableName} order by k1, k2" + sql """ DROP TABLE IF EXISTS ${tableName} """ sql """ CREATE TABLE IF NOT EXISTS ${tableName} ( diff --git a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy index 3a91e5a27fb1366..67f78e64207efb2 100644 --- a/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy +++ b/regression-test/suites/unique_with_mow_p0/partial_update/test_partial_update_seq_col.groovy @@ -161,6 +161,9 @@ suite("test_primary_key_partial_update_seq_col", "p0") { file 'basic.csv' time 10000 // limit inflight 10s } + + sql "sync" + qt_sql """ select id,score from ${tableName2} order by id;""" sql """ DROP TABLE IF EXISTS ${tableName2}; """ }