This is an automated email from the ASF dual-hosted git repository.
hellostephen 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 110543e8c01 [fix](case) bug (#56362)
110543e8c01 is described below
commit 110543e8c0155503632dbf746d129682b4bae4d0
Author: shuke <[email protected]>
AuthorDate: Wed Sep 24 14:35:48 2025 +0800
[fix](case) bug (#56362)
---
.../suites/export/test_array_export.groovy | 28 +++++++++++++++++-----
1 file changed, 22 insertions(+), 6 deletions(-)
diff --git a/regression-test/suites/export/test_array_export.groovy
b/regression-test/suites/export/test_array_export.groovy
index c1ff3668822..cdf9c6588bb 100644
--- a/regression-test/suites/export/test_array_export.groovy
+++ b/regression-test/suites/export/test_array_export.groovy
@@ -16,12 +16,26 @@
// under the License.
import org.codehaus.groovy.runtime.IOGroovyMethods
+import org.apache.doris.regression.util.Hdfs
import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.nio.file.Paths
suite("test_array_export", "export,external") {
+ // save load data in tmp dir.
+ def localDataDir = new File(new
File(System.getProperty("java.io.tmpdir")),
"doris-case"+UUID.randomUUID().toString().replaceAll("-", ""))
+ if (!localDataDir.mkdir()) {
+ throw new IOException("create dir failed: ${localDataDir}")
+ }
+
+ def download_from_hdfs= {String label_path ->
+ String hdfsFs1 = context.config.otherConfigs.get("hdfsFs")
+ String hdfsUser1 = context.config.otherConfigs.get("hdfsUser")
+ Hdfs hdfs = new Hdfs(hdfsFs1, hdfsUser1,
localDataDir.getAbsolutePath())
+ return hdfs.downLoad(label_path)
+ }
+
// check whether the FE config 'enable_outfile_to_local' is true
StringBuilder strBuilder = new StringBuilder()
strBuilder.append("curl --location-trusted -u " + context.config.jdbcUser
+ ":" + context.config.jdbcPassword)
@@ -126,7 +140,7 @@ suite("test_array_export", "export,external") {
FORMAT AS ${outFormat}
PROPERTIES
(
- "broker.name" = "${BrokerName}",
+ "fs.defaultFS"="${context.config.otherConfigs.get('hdfsFs')}",
"line_delimiter" = "\n",
"max_file_size" = "10MB",
"broker.username"="${HdfsUserName}",
@@ -138,7 +152,7 @@ suite("test_array_export", "export,external") {
}
def check_export_result = {checklabel->
- max_try_milli_secs = 15000
+ def max_try_milli_secs = 15000
while(max_try_milli_secs) {
def result = sql "show export where label='${checklabel}'"
if(result[0][2] == "FINISHED") {
@@ -227,8 +241,8 @@ suite("test_array_export", "export,external") {
def currentTotalRows = resultCount[0][0]
def label = UUID.randomUUID().toString().replaceAll("-", "")
- def result = select_out_file(tableName, hdfsDataDir + "/" + label
+ "/export-data", "csv", brokerName, hdfsUser, hdfsPasswd)
- result = downloadExportFromHdfs(label + "/export-data")
+ def result = select_out_file(tableName, hdfsDataDir + "/" + label
+ "_d_", "csv", brokerName, hdfsUser, hdfsPasswd)
+ result = download_from_hdfs(label + "_d_")
check_download_result(result, currentTotalRows)
} finally {
try_sql("DROP TABLE IF EXISTS ${tableName}")
@@ -242,12 +256,14 @@ suite("test_array_export", "export,external") {
def currentTotalRows = resultCount[0][0]
def label = UUID.randomUUID().toString().replaceAll("-", "")
- export_to_hdfs.call(tableName, label, hdfsDataDir + "/" + label,
'', brokerName, hdfsUser, hdfsPasswd)
+ export_to_hdfs.call(tableName, label, hdfsDataDir + "/" +
label+"_d_", '', brokerName, hdfsUser, hdfsPasswd)
check_export_result(label)
- def result = downloadExportFromHdfs(label + "/export-data")
+ def result = download_from_hdfs(label + "_d_")
check_download_result(result, currentTotalRows)
} finally {
try_sql("DROP TABLE IF EXISTS ${tableName}")
}
}
+
+ localDataDir.deleteDir()
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]