// Code generated by MockGen. DO NOT EDIT. // Source: github.com/pingcap/tidb/pkg/disttask/framework/taskexecutor (interfaces: TaskTable,Pool,TaskExecutor,Extension) // // Generated by this command: // // mockgen -package mock github.com/pingcap/tidb/pkg/disttask/framework/taskexecutor TaskTable,Pool,TaskExecutor,Extension // // Package mock is a generated GoMock package. package mock import ( context "context" reflect "reflect" proto "github.com/pingcap/tidb/pkg/disttask/framework/proto" execute "github.com/pingcap/tidb/pkg/disttask/framework/taskexecutor/execute" gomock "go.uber.org/mock/gomock" ) // MockTaskTable is a mock of TaskTable interface. type MockTaskTable struct { ctrl *gomock.Controller recorder *MockTaskTableMockRecorder } // MockTaskTableMockRecorder is the mock recorder for MockTaskTable. type MockTaskTableMockRecorder struct { mock *MockTaskTable } // NewMockTaskTable creates a new mock instance. func NewMockTaskTable(ctrl *gomock.Controller) *MockTaskTable { mock := &MockTaskTable{ctrl: ctrl} mock.recorder = &MockTaskTableMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockTaskTable) EXPECT() *MockTaskTableMockRecorder { return m.recorder } // FinishSubtask mocks base method. func (m *MockTaskTable) FinishSubtask(arg0 context.Context, arg1 string, arg2 int64, arg3 []byte) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "FinishSubtask", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(error) return ret0 } // FinishSubtask indicates an expected call of FinishSubtask. func (mr *MockTaskTableMockRecorder) FinishSubtask(arg0, arg1, arg2, arg3 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "FinishSubtask", reflect.TypeOf((*MockTaskTable)(nil).FinishSubtask), arg0, arg1, arg2, arg3) } // GetFirstSubtaskInStates mocks base method. func (m *MockTaskTable) GetFirstSubtaskInStates(arg0 context.Context, arg1 string, arg2 int64, arg3 proto.Step, arg4 ...any) (*proto.Subtask, error) { m.ctrl.T.Helper() varargs := []any{arg0, arg1, arg2, arg3} for _, a := range arg4 { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetFirstSubtaskInStates", varargs...) ret0, _ := ret[0].(*proto.Subtask) ret1, _ := ret[1].(error) return ret0, ret1 } // GetFirstSubtaskInStates indicates an expected call of GetFirstSubtaskInStates. func (mr *MockTaskTableMockRecorder) GetFirstSubtaskInStates(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetFirstSubtaskInStates", reflect.TypeOf((*MockTaskTable)(nil).GetFirstSubtaskInStates), varargs...) } // GetSubtasksInStates mocks base method. func (m *MockTaskTable) GetSubtasksInStates(arg0 context.Context, arg1 string, arg2 int64, arg3 proto.Step, arg4 ...any) ([]*proto.Subtask, error) { m.ctrl.T.Helper() varargs := []any{arg0, arg1, arg2, arg3} for _, a := range arg4 { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetSubtasksInStates", varargs...) ret0, _ := ret[0].([]*proto.Subtask) ret1, _ := ret[1].(error) return ret0, ret1 } // GetSubtasksInStates indicates an expected call of GetSubtasksInStates. func (mr *MockTaskTableMockRecorder) GetSubtasksInStates(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubtasksInStates", reflect.TypeOf((*MockTaskTable)(nil).GetSubtasksInStates), varargs...) } // GetTaskByID mocks base method. func (m *MockTaskTable) GetTaskByID(arg0 context.Context, arg1 int64) (*proto.Task, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetTaskByID", arg0, arg1) ret0, _ := ret[0].(*proto.Task) ret1, _ := ret[1].(error) return ret0, ret1 } // GetTaskByID indicates an expected call of GetTaskByID. func (mr *MockTaskTableMockRecorder) GetTaskByID(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTaskByID", reflect.TypeOf((*MockTaskTable)(nil).GetTaskByID), arg0, arg1) } // GetTasksInStates mocks base method. func (m *MockTaskTable) GetTasksInStates(arg0 context.Context, arg1 ...any) ([]*proto.Task, error) { m.ctrl.T.Helper() varargs := []any{arg0} for _, a := range arg1 { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "GetTasksInStates", varargs...) ret0, _ := ret[0].([]*proto.Task) ret1, _ := ret[1].(error) return ret0, ret1 } // GetTasksInStates indicates an expected call of GetTasksInStates. func (mr *MockTaskTableMockRecorder) GetTasksInStates(arg0 any, arg1 ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0}, arg1...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetTasksInStates", reflect.TypeOf((*MockTaskTable)(nil).GetTasksInStates), varargs...) } // HasSubtasksInStates mocks base method. func (m *MockTaskTable) HasSubtasksInStates(arg0 context.Context, arg1 string, arg2 int64, arg3 proto.Step, arg4 ...any) (bool, error) { m.ctrl.T.Helper() varargs := []any{arg0, arg1, arg2, arg3} for _, a := range arg4 { varargs = append(varargs, a) } ret := m.ctrl.Call(m, "HasSubtasksInStates", varargs...) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // HasSubtasksInStates indicates an expected call of HasSubtasksInStates. func (mr *MockTaskTableMockRecorder) HasSubtasksInStates(arg0, arg1, arg2, arg3 any, arg4 ...any) *gomock.Call { mr.mock.ctrl.T.Helper() varargs := append([]any{arg0, arg1, arg2, arg3}, arg4...) return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "HasSubtasksInStates", reflect.TypeOf((*MockTaskTable)(nil).HasSubtasksInStates), varargs...) } // IsTaskExecutorCanceled mocks base method. func (m *MockTaskTable) IsTaskExecutorCanceled(arg0 context.Context, arg1 string, arg2 int64) (bool, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "IsTaskExecutorCanceled", arg0, arg1, arg2) ret0, _ := ret[0].(bool) ret1, _ := ret[1].(error) return ret0, ret1 } // IsTaskExecutorCanceled indicates an expected call of IsTaskExecutorCanceled. func (mr *MockTaskTableMockRecorder) IsTaskExecutorCanceled(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsTaskExecutorCanceled", reflect.TypeOf((*MockTaskTable)(nil).IsTaskExecutorCanceled), arg0, arg1, arg2) } // PauseSubtasks mocks base method. func (m *MockTaskTable) PauseSubtasks(arg0 context.Context, arg1 string, arg2 int64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "PauseSubtasks", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } // PauseSubtasks indicates an expected call of PauseSubtasks. func (mr *MockTaskTableMockRecorder) PauseSubtasks(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "PauseSubtasks", reflect.TypeOf((*MockTaskTable)(nil).PauseSubtasks), arg0, arg1, arg2) } // StartManager mocks base method. func (m *MockTaskTable) StartManager(arg0 context.Context, arg1, arg2 string) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StartManager", arg0, arg1, arg2) ret0, _ := ret[0].(error) return ret0 } // StartManager indicates an expected call of StartManager. func (mr *MockTaskTableMockRecorder) StartManager(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartManager", reflect.TypeOf((*MockTaskTable)(nil).StartManager), arg0, arg1, arg2) } // StartSubtask mocks base method. func (m *MockTaskTable) StartSubtask(arg0 context.Context, arg1 int64) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "StartSubtask", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // StartSubtask indicates an expected call of StartSubtask. func (mr *MockTaskTableMockRecorder) StartSubtask(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "StartSubtask", reflect.TypeOf((*MockTaskTable)(nil).StartSubtask), arg0, arg1) } // UpdateErrorToSubtask mocks base method. func (m *MockTaskTable) UpdateErrorToSubtask(arg0 context.Context, arg1 string, arg2 int64, arg3 error) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateErrorToSubtask", arg0, arg1, arg2, arg3) ret0, _ := ret[0].(error) return ret0 } // UpdateErrorToSubtask indicates an expected call of UpdateErrorToSubtask. func (mr *MockTaskTableMockRecorder) UpdateErrorToSubtask(arg0, arg1, arg2, arg3 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateErrorToSubtask", reflect.TypeOf((*MockTaskTable)(nil).UpdateErrorToSubtask), arg0, arg1, arg2, arg3) } // UpdateSubtaskStateAndError mocks base method. func (m *MockTaskTable) UpdateSubtaskStateAndError(arg0 context.Context, arg1 string, arg2 int64, arg3 proto.TaskState, arg4 error) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "UpdateSubtaskStateAndError", arg0, arg1, arg2, arg3, arg4) ret0, _ := ret[0].(error) return ret0 } // UpdateSubtaskStateAndError indicates an expected call of UpdateSubtaskStateAndError. func (mr *MockTaskTableMockRecorder) UpdateSubtaskStateAndError(arg0, arg1, arg2, arg3, arg4 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "UpdateSubtaskStateAndError", reflect.TypeOf((*MockTaskTable)(nil).UpdateSubtaskStateAndError), arg0, arg1, arg2, arg3, arg4) } // MockPool is a mock of Pool interface. type MockPool struct { ctrl *gomock.Controller recorder *MockPoolMockRecorder } // MockPoolMockRecorder is the mock recorder for MockPool. type MockPoolMockRecorder struct { mock *MockPool } // NewMockPool creates a new mock instance. func NewMockPool(ctrl *gomock.Controller) *MockPool { mock := &MockPool{ctrl: ctrl} mock.recorder = &MockPoolMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockPool) EXPECT() *MockPoolMockRecorder { return m.recorder } // ReleaseAndWait mocks base method. func (m *MockPool) ReleaseAndWait() { m.ctrl.T.Helper() m.ctrl.Call(m, "ReleaseAndWait") } // ReleaseAndWait indicates an expected call of ReleaseAndWait. func (mr *MockPoolMockRecorder) ReleaseAndWait() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "ReleaseAndWait", reflect.TypeOf((*MockPool)(nil).ReleaseAndWait)) } // Run mocks base method. func (m *MockPool) Run(arg0 func()) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Run", arg0) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. func (mr *MockPoolMockRecorder) Run(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockPool)(nil).Run), arg0) } // RunWithConcurrency mocks base method. func (m *MockPool) RunWithConcurrency(arg0 chan func(), arg1 uint32) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "RunWithConcurrency", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // RunWithConcurrency indicates an expected call of RunWithConcurrency. func (mr *MockPoolMockRecorder) RunWithConcurrency(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunWithConcurrency", reflect.TypeOf((*MockPool)(nil).RunWithConcurrency), arg0, arg1) } // MockTaskExecutor is a mock of TaskExecutor interface. type MockTaskExecutor struct { ctrl *gomock.Controller recorder *MockTaskExecutorMockRecorder } // MockTaskExecutorMockRecorder is the mock recorder for MockTaskExecutor. type MockTaskExecutorMockRecorder struct { mock *MockTaskExecutor } // NewMockTaskExecutor creates a new mock instance. func NewMockTaskExecutor(ctrl *gomock.Controller) *MockTaskExecutor { mock := &MockTaskExecutor{ctrl: ctrl} mock.recorder = &MockTaskExecutorMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockTaskExecutor) EXPECT() *MockTaskExecutorMockRecorder { return m.recorder } // Close mocks base method. func (m *MockTaskExecutor) Close() { m.ctrl.T.Helper() m.ctrl.Call(m, "Close") } // Close indicates an expected call of Close. func (mr *MockTaskExecutorMockRecorder) Close() *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Close", reflect.TypeOf((*MockTaskExecutor)(nil).Close)) } // Init mocks base method. func (m *MockTaskExecutor) Init(arg0 context.Context) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Init", arg0) ret0, _ := ret[0].(error) return ret0 } // Init indicates an expected call of Init. func (mr *MockTaskExecutorMockRecorder) Init(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockTaskExecutor)(nil).Init), arg0) } // IsRetryableError mocks base method. func (m *MockTaskExecutor) IsRetryableError(arg0 error) bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "IsRetryableError", arg0) ret0, _ := ret[0].(bool) return ret0 } // IsRetryableError indicates an expected call of IsRetryableError. func (mr *MockTaskExecutorMockRecorder) IsRetryableError(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRetryableError", reflect.TypeOf((*MockTaskExecutor)(nil).IsRetryableError), arg0) } // Pause mocks base method. func (m *MockTaskExecutor) Pause(arg0 context.Context, arg1 *proto.Task) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Pause", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // Pause indicates an expected call of Pause. func (mr *MockTaskExecutorMockRecorder) Pause(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Pause", reflect.TypeOf((*MockTaskExecutor)(nil).Pause), arg0, arg1) } // Rollback mocks base method. func (m *MockTaskExecutor) Rollback(arg0 context.Context, arg1 *proto.Task) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Rollback", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // Rollback indicates an expected call of Rollback. func (mr *MockTaskExecutorMockRecorder) Rollback(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rollback", reflect.TypeOf((*MockTaskExecutor)(nil).Rollback), arg0, arg1) } // Run mocks base method. func (m *MockTaskExecutor) Run(arg0 context.Context, arg1 *proto.Task) error { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "Run", arg0, arg1) ret0, _ := ret[0].(error) return ret0 } // Run indicates an expected call of Run. func (mr *MockTaskExecutorMockRecorder) Run(arg0, arg1 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Run", reflect.TypeOf((*MockTaskExecutor)(nil).Run), arg0, arg1) } // MockExtension is a mock of Extension interface. type MockExtension struct { ctrl *gomock.Controller recorder *MockExtensionMockRecorder } // MockExtensionMockRecorder is the mock recorder for MockExtension. type MockExtensionMockRecorder struct { mock *MockExtension } // NewMockExtension creates a new mock instance. func NewMockExtension(ctrl *gomock.Controller) *MockExtension { mock := &MockExtension{ctrl: ctrl} mock.recorder = &MockExtensionMockRecorder{mock} return mock } // EXPECT returns an object that allows the caller to indicate expected use. func (m *MockExtension) EXPECT() *MockExtensionMockRecorder { return m.recorder } // GetSubtaskExecutor mocks base method. func (m *MockExtension) GetSubtaskExecutor(arg0 context.Context, arg1 *proto.Task, arg2 *execute.Summary) (execute.SubtaskExecutor, error) { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "GetSubtaskExecutor", arg0, arg1, arg2) ret0, _ := ret[0].(execute.SubtaskExecutor) ret1, _ := ret[1].(error) return ret0, ret1 } // GetSubtaskExecutor indicates an expected call of GetSubtaskExecutor. func (mr *MockExtensionMockRecorder) GetSubtaskExecutor(arg0, arg1, arg2 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "GetSubtaskExecutor", reflect.TypeOf((*MockExtension)(nil).GetSubtaskExecutor), arg0, arg1, arg2) } // IsIdempotent mocks base method. func (m *MockExtension) IsIdempotent(arg0 *proto.Subtask) bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "IsIdempotent", arg0) ret0, _ := ret[0].(bool) return ret0 } // IsIdempotent indicates an expected call of IsIdempotent. func (mr *MockExtensionMockRecorder) IsIdempotent(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsIdempotent", reflect.TypeOf((*MockExtension)(nil).IsIdempotent), arg0) } // IsRetryableError mocks base method. func (m *MockExtension) IsRetryableError(arg0 error) bool { m.ctrl.T.Helper() ret := m.ctrl.Call(m, "IsRetryableError", arg0) ret0, _ := ret[0].(bool) return ret0 } // IsRetryableError indicates an expected call of IsRetryableError. func (mr *MockExtensionMockRecorder) IsRetryableError(arg0 any) *gomock.Call { mr.mock.ctrl.T.Helper() return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "IsRetryableError", reflect.TypeOf((*MockExtension)(nil).IsRetryableError), arg0) }