diff --git a/regression-test/suites/ssb_sf1/load.groovy b/regression-test/suites/ssb_sf1/load.groovy index 421676594e..af87726756 100644 --- a/regression-test/suites/ssb_sf1/load.groovy +++ b/regression-test/suites/ssb_sf1/load.groovy @@ -57,7 +57,41 @@ suite("load") { set 'columns', columns[i] // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${context.sf1DataPath}/ssb/sf1/${tableName}.tbl.gz""" + file """${context.sf1DataPath}/ssb/sf1/${tableName}.tbl.split00.gz""" + + time 10000 // limit inflight 10s + + // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows + + // if declared a check callback, the default check condition will ignore. + // So you must check all condition + 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(json.NumberTotalRows, json.NumberLoadedRows) + assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) + } + } + streamLoad { + // a default db 'regression_test' is specified in + // ${DORIS_HOME}/conf/regression-conf.groovy + table tableName + + // default label is UUID: + // set 'label' UUID.randomUUID().toString() + + // default column_separator is specify in doris fe config, usually is '\t'. + // this line change to ',' + set 'column_separator', '|' + set 'compress_type', 'GZ' + set 'columns', columns[i] + // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. + // also, you can stream load a http stream, e.g. http://xxx/some.csv + file """${context.sf1DataPath}/ssb/sf1/${tableName}.tbl.split01.gz""" time 10000 // limit inflight 10s diff --git a/regression-test/suites/tpch_sf1_p1/load.groovy b/regression-test/suites/tpch_sf1_p1/load.groovy index 7b3e392b37..dad3a7dc73 100644 --- a/regression-test/suites/tpch_sf1_p1/load.groovy +++ b/regression-test/suites/tpch_sf1_p1/load.groovy @@ -44,7 +44,41 @@ suite("load") { // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${context.sf1DataPath}/tpch/sf1/${tableName}.csv.gz""" + file """${context.sf1DataPath}/tpch/sf1/${tableName}.csv.split00.gz""" + + time 10000 // limit inflight 10s + + // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows + + // if declared a check callback, the default check condition will ignore. + // So you must check all condition + 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(json.NumberTotalRows, json.NumberLoadedRows) + assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) + } + } + streamLoad { + // a default db 'regression_test' is specified in + // ${DORIS_HOME}/conf/regression-conf.groovy + table tableName + + // default label is UUID: + // set 'label' UUID.randomUUID().toString() + + // default column_separator is specify in doris fe config, usually is '\t'. + // this line change to ',' + set 'column_separator', '|' + set 'compress_type', 'GZ' + + // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. + // also, you can stream load a http stream, e.g. http://xxx/some.csv + file """${context.sf1DataPath}/tpch/sf1/${tableName}.csv.split01.gz""" time 10000 // limit inflight 10s diff --git a/regression-test/suites/tpch_sf1_p1/tpch_sf1/load.groovy b/regression-test/suites/tpch_sf1_p1/tpch_sf1/load.groovy index 3e5fcd0f59..9de43b3612 100644 --- a/regression-test/suites/tpch_sf1_p1/tpch_sf1/load.groovy +++ b/regression-test/suites/tpch_sf1_p1/tpch_sf1/load.groovy @@ -53,7 +53,41 @@ suite("load") { // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. // also, you can stream load a http stream, e.g. http://xxx/some.csv - file """${context.sf1DataPath}/tpch/sf1/${tableName}.csv.gz""" + file """${context.sf1DataPath}/tpch/sf1/${tableName}.csv.split00.gz""" + + time 10000 // limit inflight 10s + + // stream load action will check result, include Success status, and NumberTotalRows == NumberLoadedRows + + // if declared a check callback, the default check condition will ignore. + // So you must check all condition + 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(json.NumberTotalRows, json.NumberLoadedRows) + assertTrue(json.NumberLoadedRows > 0 && json.LoadBytes > 0) + } + } + streamLoad { + // a default db 'regression_test' is specified in + // ${DORIS_HOME}/conf/regression-conf.groovy + table tableName + + // default label is UUID: + // set 'label' UUID.randomUUID().toString() + + // default column_separator is specify in doris fe config, usually is '\t'. + // this line change to ',' + set 'column_separator', '|' + set 'compress_type', 'GZ' + + // relate to ${DORIS_HOME}/regression-test/data/demo/streamload_input.csv. + // also, you can stream load a http stream, e.g. http://xxx/some.csv + file """${context.sf1DataPath}/tpch/sf1/${tableName}.csv.split01.gz""" time 10000 // limit inflight 10s