Skip to content

Commit

Permalink
test: fix flaky test due to forget to change batch size (#42408)
Browse files Browse the repository at this point in the history
close #42402
  • Loading branch information
lance6716 authored Mar 21, 2023
1 parent 0fe2637 commit 386e204
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions executor/asyncloaddata/operate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ func (s *mockGCSSuite) TestOperateRunningJob() {
tk2.MustContainErrMsg(sql, "failed to keepalive")
}()

// TODO: remove this sleep after moving mysql.load_data_jobs to bootstrap
time.Sleep(3 * time.Second)
rows := s.tk.MustQuery("SHOW LOAD DATA JOBS;").Rows()
require.Greater(s.T(), len(rows), 0)
Expand All @@ -76,14 +75,14 @@ func (s *mockGCSSuite) TestOperateRunningJob() {
// test CANCEL

sql = fmt.Sprintf(`LOAD DATA INFILE 'gs://test-operate/t.tsv?endpoint=%s'
REPLACE INTO TABLE test_operate.t;`, gcsEndpoint)
REPLACE INTO TABLE test_operate.t WITH batch_size = 1;`, gcsEndpoint)
wg.Add(1)
go func() {
defer wg.Done()
tk2.MustContainErrMsg(sql, "failed to keepalive")
}()

time.Sleep(3 * time.Second)
time.Sleep(time.Second)
rows = s.tk.MustQuery("SHOW LOAD DATA JOBS;").Rows()
require.Greater(s.T(), len(rows), 0)
jobID = rows[len(rows)-1][0].(string)
Expand Down

0 comments on commit 386e204

Please sign in to comment.