Skip to content

Commit

Permalink
[fix](regression) fix export case (apache#22790) (apache#23115)
Browse files Browse the repository at this point in the history
Co-authored-by: zgxme <[email protected]>
  • Loading branch information
2 people authored and airborne12 committed Aug 21, 2023
1 parent 4a0b299 commit b247da5
Showing 1 changed file with 2 additions and 16 deletions.
18 changes: 2 additions & 16 deletions regression-test/suites/export_p2/test_export_big_data.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,7 @@ suite("test_export_big_data", "p2") {
String s3_endpoint = getS3Endpoint()
String region = getS3Region()
String bucket = context.config.otherConfigs.get("s3BucketName");

def check_path_exists = { dir_path ->
File path = new File(dir_path)
if (!path.exists()) {
assert path.mkdirs()
} else {
throw new IllegalStateException("""${dir_path} already exists! """)
}
}


def table_export_name = "test_export_big_data"
// create table and insert
sql """ DROP TABLE IF EXISTS ${table_export_name} """
Expand All @@ -88,13 +79,8 @@ suite("test_export_big_data", "p2") {
"format" = "csv");
"""

def outfile_path_prefix = """/mnt/datadisk1/fangtiewei/tmpdata/test_export"""
def uuid = UUID.randomUUID().toString()
def outFilePath = """${outfile_path_prefix}_${uuid}"""


// check export path
check_path_exists.call("${outFilePath}")
def outFilePath = """/tmp"""

// exec export
sql """
Expand Down

0 comments on commit b247da5

Please sign in to comment.