Skip to content

Commit

Permalink
test: fix flaky case (#50008)
Browse files Browse the repository at this point in the history
close #49984
  • Loading branch information
D3Hunter authored Jan 3, 2024
1 parent c082f85 commit a28d46b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/disttask/framework/storage/table_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,9 @@ func TestSwitchTaskStep(t *testing.T) {
require.Equal(t, []byte("changed meta"), task.Meta)
checkAfterSwitchStep(t, startTime, task, subtasksStepOne, proto.StepOne)
// switch step again, no effect
// some fields are changed in prev call, change back.
task.State = proto.TaskStatePending
task.Step = proto.StepInit
require.NoError(t, tm.SwitchTaskStep(ctx, task, proto.TaskStateRunning, proto.StepOne, subtasksStepOne))
task, err = tm.GetTaskByID(ctx, taskID)
require.NoError(t, err)
Expand Down

0 comments on commit a28d46b

Please sign in to comment.