107 lines
3.6 KiB
Go
107 lines
3.6 KiB
Go
// Code generated by MockGen. DO NOT EDIT.
|
|
// Source: github.com/pingcap/tidb/pkg/disttask/framework/scheduler/execute (interfaces: SubtaskExecutor)
|
|
|
|
// Package execute is a generated GoMock package.
|
|
package execute
|
|
|
|
import (
|
|
context "context"
|
|
reflect "reflect"
|
|
|
|
proto "github.com/pingcap/tidb/pkg/disttask/framework/proto"
|
|
gomock "go.uber.org/mock/gomock"
|
|
)
|
|
|
|
// MockSubtaskExecutor is a mock of SubtaskExecutor interface.
|
|
type MockSubtaskExecutor struct {
|
|
ctrl *gomock.Controller
|
|
recorder *MockSubtaskExecutorMockRecorder
|
|
}
|
|
|
|
// MockSubtaskExecutorMockRecorder is the mock recorder for MockSubtaskExecutor.
|
|
type MockSubtaskExecutorMockRecorder struct {
|
|
mock *MockSubtaskExecutor
|
|
}
|
|
|
|
// NewMockSubtaskExecutor creates a new mock instance.
|
|
func NewMockSubtaskExecutor(ctrl *gomock.Controller) *MockSubtaskExecutor {
|
|
mock := &MockSubtaskExecutor{ctrl: ctrl}
|
|
mock.recorder = &MockSubtaskExecutorMockRecorder{mock}
|
|
return mock
|
|
}
|
|
|
|
// EXPECT returns an object that allows the caller to indicate expected use.
|
|
func (m *MockSubtaskExecutor) EXPECT() *MockSubtaskExecutorMockRecorder {
|
|
return m.recorder
|
|
}
|
|
|
|
// Cleanup mocks base method.
|
|
func (m *MockSubtaskExecutor) Cleanup(arg0 context.Context) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Cleanup", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Cleanup indicates an expected call of Cleanup.
|
|
func (mr *MockSubtaskExecutorMockRecorder) Cleanup(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Cleanup", reflect.TypeOf((*MockSubtaskExecutor)(nil).Cleanup), arg0)
|
|
}
|
|
|
|
// Init mocks base method.
|
|
func (m *MockSubtaskExecutor) 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 *MockSubtaskExecutorMockRecorder) Init(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Init", reflect.TypeOf((*MockSubtaskExecutor)(nil).Init), arg0)
|
|
}
|
|
|
|
// OnFinished mocks base method.
|
|
func (m *MockSubtaskExecutor) OnFinished(arg0 context.Context, arg1 *proto.Subtask) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "OnFinished", arg0, arg1)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// OnFinished indicates an expected call of OnFinished.
|
|
func (mr *MockSubtaskExecutorMockRecorder) OnFinished(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OnFinished", reflect.TypeOf((*MockSubtaskExecutor)(nil).OnFinished), arg0, arg1)
|
|
}
|
|
|
|
// Rollback mocks base method.
|
|
func (m *MockSubtaskExecutor) Rollback(arg0 context.Context) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "Rollback", arg0)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// Rollback indicates an expected call of Rollback.
|
|
func (mr *MockSubtaskExecutorMockRecorder) Rollback(arg0 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "Rollback", reflect.TypeOf((*MockSubtaskExecutor)(nil).Rollback), arg0)
|
|
}
|
|
|
|
// RunSubtask mocks base method.
|
|
func (m *MockSubtaskExecutor) RunSubtask(arg0 context.Context, arg1 *proto.Subtask) error {
|
|
m.ctrl.T.Helper()
|
|
ret := m.ctrl.Call(m, "RunSubtask", arg0, arg1)
|
|
ret0, _ := ret[0].(error)
|
|
return ret0
|
|
}
|
|
|
|
// RunSubtask indicates an expected call of RunSubtask.
|
|
func (mr *MockSubtaskExecutorMockRecorder) RunSubtask(arg0, arg1 interface{}) *gomock.Call {
|
|
mr.mock.ctrl.T.Helper()
|
|
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "RunSubtask", reflect.TypeOf((*MockSubtaskExecutor)(nil).RunSubtask), arg0, arg1)
|
|
}
|