Skip to content

Commit

Permalink
fix UT
Browse files Browse the repository at this point in the history
Signed-off-by: lance6716 <lance6716@gmail.com>
  • Loading branch information
lance6716 committed Mar 11, 2024
1 parent 3da13cc commit 365733f
Showing 1 changed file with 3 additions and 11 deletions.
14 changes: 3 additions & 11 deletions pkg/executor/test/loadremotetest/multi_file_test.go
Expand Up @@ -54,14 +54,6 @@ func (s *mockGCSSuite) TestFilenameAsterisk() {
Content: []byte("5\ttest5\n" +
"6\ttest6"),
})
s.server.CreateObject(fakestorage.Object{
ObjectAttrs: fakestorage.ObjectAttrs{
BucketName: "test-multi-load",
Name: "not.me.[1-9].tsv",
},
Content: []byte("7\ttest7\n" +
"8\ttest8"),
})
s.server.CreateObject(fakestorage.Object{
ObjectAttrs: fakestorage.ObjectAttrs{
BucketName: "not-me",
Expand All @@ -88,14 +80,14 @@ func (s *mockGCSSuite) TestFilenameAsterisk() {
"2 test2", "4 test4", "6 test6",
))

// only '*' is supported in pattern matching
// only `*` and `[]` is supported in pattern matching
s.tk.MustExec("TRUNCATE TABLE multi_load.t;")
sql = fmt.Sprintf(`LOAD DATA INFILE 'gs://test-multi-load/not.me.[1-9].tsv?endpoint=%s'
sql = fmt.Sprintf(`LOAD DATA INFILE 'gs://test-multi-load/db.tbl.00[13].tsv?endpoint=%s'
INTO TABLE multi_load.t with thread=1;`, gcsEndpoint)
s.tk.MustExec(sql)
s.Equal(uint64(0), s.tk.Session().GetSessionVars().StmtCtx.LastInsertID)
s.tk.MustQuery("SELECT * FROM multi_load.t;").Check(testkit.Rows(
"7 test7", "8 test8",
"1 test1", "2 test2", "5 test5", "6 test6",
))
}

Expand Down

0 comments on commit 365733f

Please sign in to comment.