This is an automated email from the ASF dual-hosted git repository.
dataroaring 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 cd7ad99de09 [improvement](regression-test) add chunked transfer json
test (#26902)
cd7ad99de09 is described below
commit cd7ad99de09f0f6e11e0c97c852e75af059cf44c
Author: HHoflittlefish777 <[email protected]>
AuthorDate: Tue Nov 14 10:31:30 2023 +0800
[improvement](regression-test) add chunked transfer json test (#26902)
---
.../load_p0/stream_load/test_chunked_transfer.json | 2 ++
.../data/load_p0/stream_load/test_stream_load.out | 6 ++++-
.../load_p0/stream_load/test_stream_load.groovy | 30 +++++++++++++++++++++-
3 files changed, 36 insertions(+), 2 deletions(-)
diff --git
a/regression-test/data/load_p0/stream_load/test_chunked_transfer.json
b/regression-test/data/load_p0/stream_load/test_chunked_transfer.json
new file mode 100644
index 00000000000..25c04715335
--- /dev/null
+++ b/regression-test/data/load_p0/stream_load/test_chunked_transfer.json
@@ -0,0 +1,2 @@
+{ "k1": "1", "k2": "50", "v1": "1", "v2": "1", "v3": "3", "k4": "1"}
+{ "k1": "-1", "k2": "50", "v1": "1", "v2": "1", "v3": "3", "k4": "1"}
\ No newline at end of file
diff --git a/regression-test/data/load_p0/stream_load/test_stream_load.out
b/regression-test/data/load_p0/stream_load/test_stream_load.out
index 71e0166fef4..a89a09c301d 100644
--- a/regression-test/data/load_p0/stream_load/test_stream_load.out
+++ b/regression-test/data/load_p0/stream_load/test_stream_load.out
@@ -123,7 +123,11 @@
1 -50 1 2 1 \N
2 -50 1 44 1 \N
--- !sql_chunked_transfer --
+-- !sql_chunked_transfer_csv --
1 -50 1 2 1 \N
2 -50 1 44 1 \N
+-- !sql_chunked_transfer_json --
+-1 50 1 1 3 \N
+1 50 1 1 3 \N
+
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 dc6060d44d5..3e78a83a606 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
@@ -1245,7 +1245,35 @@ suite("test_stream_load", "p0") {
json2pc = parseJson(out)
log.info("test chunked transfer result: ${out}".toString())
- qt_sql_chunked_transfer "select * from ${tableName16} order by k1"
+ qt_sql_chunked_transfer_csv "select * from ${tableName16} order by k1"
+ } finally {
+ sql """ DROP TABLE IF EXISTS ${tableName16} FORCE"""
+ }
+
+ try {
+ sql """ DROP TABLE IF EXISTS ${tableName16} """
+ sql """
+ CREATE TABLE IF NOT EXISTS ${tableName16} (
+ `k1` bigint(20) NULL DEFAULT "1",
+ `k2` bigint(20) NULL ,
+ `v1` tinyint(4) NULL,
+ `v2` tinyint(4) NULL,
+ `v3` tinyint(4) NULL,
+ `v4` DATETIME NULL
+ ) ENGINE=OLAP
+ DISTRIBUTED BY HASH(`k1`) BUCKETS 3
+ PROPERTIES ("replication_allocation" = "tag.location.default: 1");
+ """
+
+ def command = "curl --location-trusted -u
${context.config.feHttpUser}:${context.config.feHttpPassword} -H
Transfer-Encoding:chunked -H format:json -H read_json_by_line:true -T
${context.dataPath}/test_chunked_transfer.json
http://${context.config.feHttpAddress}/api/${db}/${tableName16}/_stream_load"
+ log.info("test chunked transfer command: ${command}")
+ def process = command.execute()
+ code = process.waitFor()
+ out = process.text
+ json2pc = parseJson(out)
+ log.info("test chunked transfer result: ${out}".toString())
+
+ qt_sql_chunked_transfer_json "select * from ${tableName16} order by k1"
} finally {
sql """ DROP TABLE IF EXISTS ${tableName16} FORCE"""
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]