This is an automated email from the ASF dual-hosted git repository. yiguolei pushed a commit to branch branch-2.1 in repository https://gitbox.apache.org/repos/asf/doris.git
commit efe9a962e7bb1574093e34fca73e2d8039206cf1 Author: Xin Liao <[email protected]> AuthorDate: Thu Feb 8 11:45:17 2024 +0800 [fix](test) Increase the timeout duration for the test case (#30952) --- .../data/datatype_p0/decimalv3/test.csv | 3 +++ .../suites/datatype_p0/decimalv3/test_load.groovy | 31 ++++++++++++---------- 2 files changed, 20 insertions(+), 14 deletions(-) diff --git a/regression-test/data/datatype_p0/decimalv3/test.csv b/regression-test/data/datatype_p0/decimalv3/test.csv new file mode 100644 index 00000000000..667fe01c08b --- /dev/null +++ b/regression-test/data/datatype_p0/decimalv3/test.csv @@ -0,0 +1,3 @@ +0.00013225356500247968 +0.00039016009826936000 +0.00013503989119010048 diff --git a/regression-test/suites/datatype_p0/decimalv3/test_load.groovy b/regression-test/suites/datatype_p0/decimalv3/test_load.groovy index 48cfb286f45..c1a6a944d79 100644 --- a/regression-test/suites/datatype_p0/decimalv3/test_load.groovy +++ b/regression-test/suites/datatype_p0/decimalv3/test_load.groovy @@ -22,10 +22,6 @@ import java.nio.file.Files import java.nio.file.Paths suite("test_load") { - def dbName = "test_load" - sql "CREATE DATABASE IF NOT EXISTS ${dbName}" - sql "USE $dbName" - def tableName = "test_decimal_load" try { sql """ DROP TABLE IF EXISTS ${tableName} """ @@ -41,16 +37,23 @@ suite("test_load") { ); """ - StringBuilder commandBuilder = new StringBuilder() - commandBuilder.append("""curl --max-time 5 --location-trusted -u ${context.config.feHttpUser}:${context.config.feHttpPassword}""") - commandBuilder.append(""" -H format:csv -T ${context.file.parent}/test_data/test.csv http://${context.config.feHttpAddress}/api/""" + dbName + "/" + tableName + "/_stream_load") - command = commandBuilder.toString() - process = command.execute() - code = process.waitFor() - err = IOGroovyMethods.getText(new BufferedReader(new InputStreamReader(process.getErrorStream()))) - out = process.getText() - logger.info("Run command: command=" + command + ",code=" + code + ", out=" + out + ", err=" + err) - assertEquals(code, 0) + streamLoad { + table "${tableName}" + + file 'test.csv' + time 10000 // limit inflight 10s + + check { result, exception, startTime, endTime -> + if (exception != null) { + throw exception + } + log.info("Stream load result: ${result}".toString()) + def json = parseJson(result) + assertEquals("success", json.Status.toLowerCase()) + assertEquals(3, json.NumberTotalRows) + assertEquals(0, json.NumberFilteredRows) + } + } sql """sync""" qt_select_default """ SELECT * FROM ${tableName} t ORDER BY a; """ --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
