Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ywqzzy committed Dec 4, 2023
1 parent ddd55e4 commit 4d6837b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pkg/disttask/framework/testutil/disttest_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func RegisterTaskMeta(t *testing.T, ctrl *gomock.Controller, dispatcherHandle di
}
mockExtension.EXPECT().IsIdempotent(gomock.Any()).Return(true).AnyTimes()
mockExtension.EXPECT().GetSubtaskExecutor(gomock.Any(), gomock.Any(), gomock.Any()).Return(mockSubtaskExecutor, nil).AnyTimes()
mockExtension.EXPECT().IsRetryableError(gomock.Any()).Return(false).AnyTimes()
registerTaskMetaInner(t, proto.TaskTypeExample, mockExtension, mockCleanupRountine, dispatcherHandle)
}

Expand Down Expand Up @@ -108,6 +109,7 @@ func RegisterRollbackTaskMeta(t *testing.T, ctrl *gomock.Controller, mockDispatc
mockExecutor.EXPECT().OnFinished(gomock.Any(), gomock.Any()).Return(nil).AnyTimes()
mockExtension.EXPECT().IsIdempotent(gomock.Any()).Return(true).AnyTimes()
mockExtension.EXPECT().GetSubtaskExecutor(gomock.Any(), gomock.Any(), gomock.Any()).Return(mockExecutor, nil).AnyTimes()
mockExtension.EXPECT().IsRetryableError(gomock.Any()).Return(false).AnyTimes()

registerTaskMetaInner(t, proto.TaskTypeExample, mockExtension, mockCleanupRountine, mockDispatcher)
testContext.RollbackCnt.Store(0)
Expand Down
1 change: 1 addition & 0 deletions pkg/disttask/framework/testutil/executor_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ func GetMockTaskExecutorExtension(ctrl *gomock.Controller, mockSubtaskExecutor *
mockExtension.EXPECT().
GetSubtaskExecutor(gomock.Any(), gomock.Any(), gomock.Any()).
Return(mockSubtaskExecutor, nil).AnyTimes()
mockExtension.EXPECT().IsRetryableError(gomock.Any()).Return(false).AnyTimes()
return mockExtension
}

Expand Down

0 comments on commit 4d6837b

Please sign in to comment.