Skip to content

Commit

Permalink
fix another test
Browse files Browse the repository at this point in the history
Signed-off-by: lance6716 <lance6716@gmail.com>
  • Loading branch information
lance6716 committed Mar 16, 2023
1 parent eb94497 commit 24bd2b9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions executor/asyncloaddata/util_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,13 +201,14 @@ func TestKeepAlive(t *testing.T) {
expected.StatusMessage = ""
checkEqualIgnoreTimes(t, expected, info)

// Now the worker calls FailJob
// Now the worker calls FailJob, but the status should still be canceled,
// that's more friendly.

err = FailJob(ctx, tk.Session(), id, "failed to keepalive")
require.NoError(t, err)
info, err = GetJobInfo(ctx, tk.Session(), id, "user")
require.NoError(t, err)
expected.Status = JobFailed
expected.Status = JobCanceled
expected.StatusMessage = "failed to keepalive"
checkEqualIgnoreTimes(t, expected, info)
}
Expand Down
2 changes: 1 addition & 1 deletion executor/load_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -578,7 +578,7 @@ func (e *LoadDataWorker) doLoad(
return err2
}
if !ok {
return errors.Errorf("failed to keepalive for LOAD DATA job %d", jobID)
return errors.Errorf("failed to update job progress, the job %d is interrupted by user or failed to keepalive", jobID)
}
}
}
Expand Down

0 comments on commit 24bd2b9

Please sign in to comment.