From de5bc6a8a58979b018b2c25c8e5f175be300bfd9 Mon Sep 17 00:00:00 2001 From: Mingyu Chen Date: Tue, 25 Oct 2022 14:13:24 +0800 Subject: [PATCH] [fix](regression-test) set label for stream load (#13620) --- .../load_p0/stream_load/test_json_load.groovy | 25 ++++++++++--------- 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/regression-test/suites/load_p0/stream_load/test_json_load.groovy b/regression-test/suites/load_p0/stream_load/test_json_load.groovy index 8474635d0e..8dc594c660 100644 --- a/regression-test/suites/load_p0/stream_load/test_json_load.groovy +++ b/regression-test/suites/load_p0/stream_load/test_json_load.groovy @@ -90,13 +90,14 @@ suite("test_json_load", "p0") { assertTrue(result1[0][0] == 0, "Create table should update 0 rows") } - def load_json_data = {strip_flag, read_flag, format_flag, exprs, json_paths, + def load_json_data = {label, strip_flag, read_flag, format_flag, exprs, json_paths, json_root, where_expr, fuzzy_flag, file_name, ignore_failure=false -> // load the json data streamLoad { table "test_json_load" // set http request header params + set 'label', label + "_" + UUID.randomUUID().toString() set 'strip_outer_array', strip_flag set 'read_json_by_line', read_flag set 'format', format_flag @@ -181,7 +182,7 @@ suite("test_json_load", "p0") { create_test_table1.call(testTable) - load_json_data.call('true', '', 'json', '', '', '', '', '', 'simple_json.json') + load_json_data.call('test_json_load_case1', 'true', '', 'json', '', '', '', '', '', 'simple_json.json') sql "sync" qt_select "select * from ${testTable} order by id" @@ -196,7 +197,7 @@ suite("test_json_load", "p0") { create_test_table1.call(testTable) - load_json_data.call('true', '', 'json', 'id= id * 10', '', '', '', '', 'simple_json.json') + load_json_data.call('test_json_load_case2', 'true', '', 'json', 'id= id * 10', '', '', '', '', 'simple_json.json') sql "sync" qt_select "select * from ${testTable} order by id" @@ -211,7 +212,7 @@ suite("test_json_load", "p0") { create_test_table2.call(testTable) - load_json_data.call('true', '', 'json', '', '[\"$.id\", \"$.code\"]', + load_json_data.call('test_json_load_case3', 'true', '', 'json', '', '[\"$.id\", \"$.code\"]', '', '', '', 'simple_json.json') sql "sync" @@ -227,7 +228,7 @@ suite("test_json_load", "p0") { create_test_table2.call(testTable) - load_json_data.call('true', '', 'json', 'code = id * 10 + 200', '[\"$.id\"]', + load_json_data.call('test_json_load_case4', 'true', '', 'json', 'code = id * 10 + 200', '[\"$.id\"]', '', '', '', 'simple_json.json') sql "sync" @@ -243,7 +244,7 @@ suite("test_json_load", "p0") { create_test_table2.call(testTable) - load_json_data.call('true', 'true', 'json', '', '[\"$.id\", \"$.code\"]', + load_json_data.call('test_json_load_case5', 'true', 'true', 'json', '', '[\"$.id\", \"$.code\"]', '', '', '', 'multi_line_json.json') sql "sync" @@ -259,7 +260,7 @@ suite("test_json_load", "p0") { create_test_table2.call(testTable) - load_json_data.call('true', 'true', 'json', 'id= id * 10', '[\"$.id\", \"$.code\"]', + load_json_data.call('test_json_load_case6', 'true', 'true', 'json', 'id= id * 10', '[\"$.id\", \"$.code\"]', '', '', '', 'multi_line_json.json') sql "sync" @@ -275,7 +276,7 @@ suite("test_json_load", "p0") { create_test_table2.call(testTable) - load_json_data.call('true', 'true', 'json', 'id= id * 10', '[\"$.id\", \"$.code\"]', + load_json_data.call('test_json_load_case7', 'true', 'true', 'json', 'id= id * 10', '[\"$.id\", \"$.code\"]', '', 'id > 50', '', 'multi_line_json.json') sql "sync" @@ -291,7 +292,7 @@ suite("test_json_load", "p0") { create_test_table2.call(testTable) - load_json_data.call('true', 'true', 'json', 'id= id * 10', '[\"$.id\", \"$.code\"]', + load_json_data.call('test_json_load_case8', 'true', 'true', 'json', 'id= id * 10', '[\"$.id\", \"$.code\"]', '', 'id > 50', 'true', 'multi_line_json.json') sql "sync" @@ -307,7 +308,7 @@ suite("test_json_load", "p0") { create_test_table1.call(testTable) - load_json_data.call('', 'true', 'json', 'id= id * 10', '', + load_json_data.call('test_json_load_case9', '', 'true', 'json', 'id= id * 10', '', '$.item', '', 'true', 'nest_json.json') sql "sync" @@ -322,7 +323,7 @@ suite("test_json_load", "p0") { create_test_table1.call(testTable) - load_json_data.call('', 'true', 'json', 'id= id * 10', '', + load_json_data.call('test_json_load_case10', '', 'true', 'json', 'id= id * 10', '', '$.item', '', 'true', 'invalid_json.json', true) sql "sync" @@ -376,7 +377,7 @@ suite("test_json_load", "p0") { sql "DROP TABLE IF EXISTS ${testTable}" test_invalid_json_array_table.call(testTable) - load_json_data.call('true', '', 'json', '', '', + load_json_data.call('test_json_load_case11', 'true', '', 'json', '', '', '', '', '', 'invalid_json_array.json', true) sql "sync"