2023-09-04 21:19:48 +08:00
// Code generated by mockery v2.32.4. DO NOT EDIT.
2022-09-15 18:48:32 +08:00
package task
2023-09-27 16:27:27 +08:00
import mock "github.com/stretchr/testify/mock"
2022-09-15 18:48:32 +08:00
// MockScheduler is an autogenerated mock type for the Scheduler type
type MockScheduler struct {
mock . Mock
}
type MockScheduler_Expecter struct {
mock * mock . Mock
}
func ( _m * MockScheduler ) EXPECT ( ) * MockScheduler_Expecter {
return & MockScheduler_Expecter { mock : & _m . Mock }
}
// Add provides a mock function with given fields: task
func ( _m * MockScheduler ) Add ( task Task ) error {
ret := _m . Called ( task )
var r0 error
if rf , ok := ret . Get ( 0 ) . ( func ( Task ) error ) ; ok {
r0 = rf ( task )
} else {
r0 = ret . Error ( 0 )
}
return r0
}
// MockScheduler_Add_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Add'
type MockScheduler_Add_Call struct {
* mock . Call
}
// Add is a helper method to define mock.On call
2023-10-08 15:05:31 +08:00
// - task Task
2022-09-15 18:48:32 +08:00
func ( _e * MockScheduler_Expecter ) Add ( task interface { } ) * MockScheduler_Add_Call {
return & MockScheduler_Add_Call { Call : _e . mock . On ( "Add" , task ) }
}
func ( _c * MockScheduler_Add_Call ) Run ( run func ( task Task ) ) * MockScheduler_Add_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( args [ 0 ] . ( Task ) )
} )
return _c
}
func ( _c * MockScheduler_Add_Call ) Return ( _a0 error ) * MockScheduler_Add_Call {
_c . Call . Return ( _a0 )
return _c
}
2023-09-04 21:19:48 +08:00
func ( _c * MockScheduler_Add_Call ) RunAndReturn ( run func ( Task ) error ) * MockScheduler_Add_Call {
_c . Call . Return ( run )
return _c
}
2022-11-30 13:57:15 +08:00
// AddExecutor provides a mock function with given fields: nodeID
func ( _m * MockScheduler ) AddExecutor ( nodeID int64 ) {
_m . Called ( nodeID )
}
// MockScheduler_AddExecutor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddExecutor'
type MockScheduler_AddExecutor_Call struct {
* mock . Call
}
// AddExecutor is a helper method to define mock.On call
2023-10-08 15:05:31 +08:00
// - nodeID int64
2022-11-30 13:57:15 +08:00
func ( _e * MockScheduler_Expecter ) AddExecutor ( nodeID interface { } ) * MockScheduler_AddExecutor_Call {
return & MockScheduler_AddExecutor_Call { Call : _e . mock . On ( "AddExecutor" , nodeID ) }
}
func ( _c * MockScheduler_AddExecutor_Call ) Run ( run func ( nodeID int64 ) ) * MockScheduler_AddExecutor_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( args [ 0 ] . ( int64 ) )
} )
return _c
}
func ( _c * MockScheduler_AddExecutor_Call ) Return ( ) * MockScheduler_AddExecutor_Call {
_c . Call . Return ( )
return _c
}
2023-09-04 21:19:48 +08:00
func ( _c * MockScheduler_AddExecutor_Call ) RunAndReturn ( run func ( int64 ) ) * MockScheduler_AddExecutor_Call {
_c . Call . Return ( run )
return _c
}
2022-09-15 18:48:32 +08:00
// Dispatch provides a mock function with given fields: node
func ( _m * MockScheduler ) Dispatch ( node int64 ) {
_m . Called ( node )
}
// MockScheduler_Dispatch_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Dispatch'
type MockScheduler_Dispatch_Call struct {
* mock . Call
}
// Dispatch is a helper method to define mock.On call
2023-10-08 15:05:31 +08:00
// - node int64
2022-09-15 18:48:32 +08:00
func ( _e * MockScheduler_Expecter ) Dispatch ( node interface { } ) * MockScheduler_Dispatch_Call {
return & MockScheduler_Dispatch_Call { Call : _e . mock . On ( "Dispatch" , node ) }
}
func ( _c * MockScheduler_Dispatch_Call ) Run ( run func ( node int64 ) ) * MockScheduler_Dispatch_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( args [ 0 ] . ( int64 ) )
} )
return _c
}
func ( _c * MockScheduler_Dispatch_Call ) Return ( ) * MockScheduler_Dispatch_Call {
_c . Call . Return ( )
return _c
}
2023-09-04 21:19:48 +08:00
func ( _c * MockScheduler_Dispatch_Call ) RunAndReturn ( run func ( int64 ) ) * MockScheduler_Dispatch_Call {
_c . Call . Return ( run )
return _c
}
2024-06-27 19:06:05 +08:00
// GetChannelTaskDelta provides a mock function with given fields: nodeID, collectionID
func ( _m * MockScheduler ) GetChannelTaskDelta ( nodeID int64 , collectionID int64 ) int {
ret := _m . Called ( nodeID , collectionID )
var r0 int
if rf , ok := ret . Get ( 0 ) . ( func ( int64 , int64 ) int ) ; ok {
r0 = rf ( nodeID , collectionID )
} else {
r0 = ret . Get ( 0 ) . ( int )
}
return r0
}
// MockScheduler_GetChannelTaskDelta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelTaskDelta'
type MockScheduler_GetChannelTaskDelta_Call struct {
* mock . Call
}
// GetChannelTaskDelta is a helper method to define mock.On call
// - nodeID int64
// - collectionID int64
func ( _e * MockScheduler_Expecter ) GetChannelTaskDelta ( nodeID interface { } , collectionID interface { } ) * MockScheduler_GetChannelTaskDelta_Call {
return & MockScheduler_GetChannelTaskDelta_Call { Call : _e . mock . On ( "GetChannelTaskDelta" , nodeID , collectionID ) }
}
func ( _c * MockScheduler_GetChannelTaskDelta_Call ) Run ( run func ( nodeID int64 , collectionID int64 ) ) * MockScheduler_GetChannelTaskDelta_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( args [ 0 ] . ( int64 ) , args [ 1 ] . ( int64 ) )
} )
return _c
}
func ( _c * MockScheduler_GetChannelTaskDelta_Call ) Return ( _a0 int ) * MockScheduler_GetChannelTaskDelta_Call {
_c . Call . Return ( _a0 )
return _c
}
func ( _c * MockScheduler_GetChannelTaskDelta_Call ) RunAndReturn ( run func ( int64 , int64 ) int ) * MockScheduler_GetChannelTaskDelta_Call {
_c . Call . Return ( run )
return _c
}
2023-04-18 18:30:32 +08:00
// GetChannelTaskNum provides a mock function with given fields:
func ( _m * MockScheduler ) GetChannelTaskNum ( ) int {
ret := _m . Called ( )
var r0 int
if rf , ok := ret . Get ( 0 ) . ( func ( ) int ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Get ( 0 ) . ( int )
}
return r0
}
// MockScheduler_GetChannelTaskNum_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetChannelTaskNum'
type MockScheduler_GetChannelTaskNum_Call struct {
* mock . Call
}
// GetChannelTaskNum is a helper method to define mock.On call
func ( _e * MockScheduler_Expecter ) GetChannelTaskNum ( ) * MockScheduler_GetChannelTaskNum_Call {
return & MockScheduler_GetChannelTaskNum_Call { Call : _e . mock . On ( "GetChannelTaskNum" ) }
}
func ( _c * MockScheduler_GetChannelTaskNum_Call ) Run ( run func ( ) ) * MockScheduler_GetChannelTaskNum_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( )
} )
return _c
}
func ( _c * MockScheduler_GetChannelTaskNum_Call ) Return ( _a0 int ) * MockScheduler_GetChannelTaskNum_Call {
_c . Call . Return ( _a0 )
return _c
}
2023-09-04 21:19:48 +08:00
func ( _c * MockScheduler_GetChannelTaskNum_Call ) RunAndReturn ( run func ( ) int ) * MockScheduler_GetChannelTaskNum_Call {
_c . Call . Return ( run )
return _c
}
2024-06-07 08:25:53 +08:00
// GetExecutedFlag provides a mock function with given fields: nodeID
func ( _m * MockScheduler ) GetExecutedFlag ( nodeID int64 ) <- chan struct { } {
ret := _m . Called ( nodeID )
var r0 <- chan struct { }
if rf , ok := ret . Get ( 0 ) . ( func ( int64 ) <- chan struct { } ) ; ok {
r0 = rf ( nodeID )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( <- chan struct { } )
}
}
return r0
}
// MockScheduler_GetExecutedFlag_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetExecutedFlag'
type MockScheduler_GetExecutedFlag_Call struct {
* mock . Call
}
// GetExecutedFlag is a helper method to define mock.On call
// - nodeID int64
func ( _e * MockScheduler_Expecter ) GetExecutedFlag ( nodeID interface { } ) * MockScheduler_GetExecutedFlag_Call {
return & MockScheduler_GetExecutedFlag_Call { Call : _e . mock . On ( "GetExecutedFlag" , nodeID ) }
}
func ( _c * MockScheduler_GetExecutedFlag_Call ) Run ( run func ( nodeID int64 ) ) * MockScheduler_GetExecutedFlag_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( args [ 0 ] . ( int64 ) )
} )
return _c
}
func ( _c * MockScheduler_GetExecutedFlag_Call ) Return ( _a0 <- chan struct { } ) * MockScheduler_GetExecutedFlag_Call {
_c . Call . Return ( _a0 )
return _c
}
func ( _c * MockScheduler_GetExecutedFlag_Call ) RunAndReturn ( run func ( int64 ) <- chan struct { } ) * MockScheduler_GetExecutedFlag_Call {
_c . Call . Return ( run )
return _c
}
2024-06-27 19:06:05 +08:00
// GetSegmentTaskDelta provides a mock function with given fields: nodeID, collectionID
func ( _m * MockScheduler ) GetSegmentTaskDelta ( nodeID int64 , collectionID int64 ) int {
ret := _m . Called ( nodeID , collectionID )
2022-09-15 18:48:32 +08:00
var r0 int
2024-06-27 19:06:05 +08:00
if rf , ok := ret . Get ( 0 ) . ( func ( int64 , int64 ) int ) ; ok {
r0 = rf ( nodeID , collectionID )
2022-09-15 18:48:32 +08:00
} else {
r0 = ret . Get ( 0 ) . ( int )
}
return r0
}
2024-06-27 19:06:05 +08:00
// MockScheduler_GetSegmentTaskDelta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSegmentTaskDelta'
type MockScheduler_GetSegmentTaskDelta_Call struct {
2022-09-15 18:48:32 +08:00
* mock . Call
}
2024-06-27 19:06:05 +08:00
// GetSegmentTaskDelta is a helper method to define mock.On call
2023-10-08 15:05:31 +08:00
// - nodeID int64
2024-06-27 19:06:05 +08:00
// - collectionID int64
func ( _e * MockScheduler_Expecter ) GetSegmentTaskDelta ( nodeID interface { } , collectionID interface { } ) * MockScheduler_GetSegmentTaskDelta_Call {
return & MockScheduler_GetSegmentTaskDelta_Call { Call : _e . mock . On ( "GetSegmentTaskDelta" , nodeID , collectionID ) }
2022-09-15 18:48:32 +08:00
}
2024-06-27 19:06:05 +08:00
func ( _c * MockScheduler_GetSegmentTaskDelta_Call ) Run ( run func ( nodeID int64 , collectionID int64 ) ) * MockScheduler_GetSegmentTaskDelta_Call {
2022-09-15 18:48:32 +08:00
_c . Call . Run ( func ( args mock . Arguments ) {
2024-06-27 19:06:05 +08:00
run ( args [ 0 ] . ( int64 ) , args [ 1 ] . ( int64 ) )
2022-09-15 18:48:32 +08:00
} )
return _c
}
2024-06-27 19:06:05 +08:00
func ( _c * MockScheduler_GetSegmentTaskDelta_Call ) Return ( _a0 int ) * MockScheduler_GetSegmentTaskDelta_Call {
2022-09-15 18:48:32 +08:00
_c . Call . Return ( _a0 )
return _c
}
2024-06-27 19:06:05 +08:00
func ( _c * MockScheduler_GetSegmentTaskDelta_Call ) RunAndReturn ( run func ( int64 , int64 ) int ) * MockScheduler_GetSegmentTaskDelta_Call {
2023-09-04 21:19:48 +08:00
_c . Call . Return ( run )
return _c
}
2023-04-18 18:30:32 +08:00
// GetSegmentTaskNum provides a mock function with given fields:
func ( _m * MockScheduler ) GetSegmentTaskNum ( ) int {
ret := _m . Called ( )
var r0 int
if rf , ok := ret . Get ( 0 ) . ( func ( ) int ) ; ok {
r0 = rf ( )
} else {
r0 = ret . Get ( 0 ) . ( int )
}
return r0
}
// MockScheduler_GetSegmentTaskNum_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetSegmentTaskNum'
type MockScheduler_GetSegmentTaskNum_Call struct {
* mock . Call
}
// GetSegmentTaskNum is a helper method to define mock.On call
func ( _e * MockScheduler_Expecter ) GetSegmentTaskNum ( ) * MockScheduler_GetSegmentTaskNum_Call {
return & MockScheduler_GetSegmentTaskNum_Call { Call : _e . mock . On ( "GetSegmentTaskNum" ) }
}
func ( _c * MockScheduler_GetSegmentTaskNum_Call ) Run ( run func ( ) ) * MockScheduler_GetSegmentTaskNum_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( )
} )
return _c
}
func ( _c * MockScheduler_GetSegmentTaskNum_Call ) Return ( _a0 int ) * MockScheduler_GetSegmentTaskNum_Call {
_c . Call . Return ( _a0 )
return _c
}
2023-09-04 21:19:48 +08:00
func ( _c * MockScheduler_GetSegmentTaskNum_Call ) RunAndReturn ( run func ( ) int ) * MockScheduler_GetSegmentTaskNum_Call {
_c . Call . Return ( run )
return _c
}
2022-09-15 18:48:32 +08:00
// RemoveByNode provides a mock function with given fields: node
func ( _m * MockScheduler ) RemoveByNode ( node int64 ) {
_m . Called ( node )
}
// MockScheduler_RemoveByNode_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveByNode'
type MockScheduler_RemoveByNode_Call struct {
* mock . Call
}
// RemoveByNode is a helper method to define mock.On call
2023-10-08 15:05:31 +08:00
// - node int64
2022-09-15 18:48:32 +08:00
func ( _e * MockScheduler_Expecter ) RemoveByNode ( node interface { } ) * MockScheduler_RemoveByNode_Call {
return & MockScheduler_RemoveByNode_Call { Call : _e . mock . On ( "RemoveByNode" , node ) }
}
func ( _c * MockScheduler_RemoveByNode_Call ) Run ( run func ( node int64 ) ) * MockScheduler_RemoveByNode_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( args [ 0 ] . ( int64 ) )
} )
return _c
}
func ( _c * MockScheduler_RemoveByNode_Call ) Return ( ) * MockScheduler_RemoveByNode_Call {
_c . Call . Return ( )
return _c
}
2023-09-04 21:19:48 +08:00
func ( _c * MockScheduler_RemoveByNode_Call ) RunAndReturn ( run func ( int64 ) ) * MockScheduler_RemoveByNode_Call {
_c . Call . Return ( run )
return _c
}
2022-11-30 13:57:15 +08:00
// RemoveExecutor provides a mock function with given fields: nodeID
func ( _m * MockScheduler ) RemoveExecutor ( nodeID int64 ) {
_m . Called ( nodeID )
}
// MockScheduler_RemoveExecutor_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'RemoveExecutor'
type MockScheduler_RemoveExecutor_Call struct {
* mock . Call
}
// RemoveExecutor is a helper method to define mock.On call
2023-10-08 15:05:31 +08:00
// - nodeID int64
2022-11-30 13:57:15 +08:00
func ( _e * MockScheduler_Expecter ) RemoveExecutor ( nodeID interface { } ) * MockScheduler_RemoveExecutor_Call {
return & MockScheduler_RemoveExecutor_Call { Call : _e . mock . On ( "RemoveExecutor" , nodeID ) }
}
func ( _c * MockScheduler_RemoveExecutor_Call ) Run ( run func ( nodeID int64 ) ) * MockScheduler_RemoveExecutor_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( args [ 0 ] . ( int64 ) )
} )
return _c
}
func ( _c * MockScheduler_RemoveExecutor_Call ) Return ( ) * MockScheduler_RemoveExecutor_Call {
_c . Call . Return ( )
return _c
}
2023-09-04 21:19:48 +08:00
func ( _c * MockScheduler_RemoveExecutor_Call ) RunAndReturn ( run func ( int64 ) ) * MockScheduler_RemoveExecutor_Call {
_c . Call . Return ( run )
return _c
}
2023-09-27 16:27:27 +08:00
// Start provides a mock function with given fields:
func ( _m * MockScheduler ) Start ( ) {
_m . Called ( )
2022-09-21 14:42:51 +08:00
}
// MockScheduler_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
type MockScheduler_Start_Call struct {
* mock . Call
}
// Start is a helper method to define mock.On call
2023-09-27 16:27:27 +08:00
func ( _e * MockScheduler_Expecter ) Start ( ) * MockScheduler_Start_Call {
return & MockScheduler_Start_Call { Call : _e . mock . On ( "Start" ) }
2022-09-21 14:42:51 +08:00
}
2023-09-27 16:27:27 +08:00
func ( _c * MockScheduler_Start_Call ) Run ( run func ( ) ) * MockScheduler_Start_Call {
2022-09-21 14:42:51 +08:00
_c . Call . Run ( func ( args mock . Arguments ) {
2023-09-27 16:27:27 +08:00
run ( )
2022-09-21 14:42:51 +08:00
} )
return _c
}
func ( _c * MockScheduler_Start_Call ) Return ( ) * MockScheduler_Start_Call {
_c . Call . Return ( )
return _c
}
2023-09-27 16:27:27 +08:00
func ( _c * MockScheduler_Start_Call ) RunAndReturn ( run func ( ) ) * MockScheduler_Start_Call {
2023-09-04 21:19:48 +08:00
_c . Call . Return ( run )
return _c
}
2022-09-21 14:42:51 +08:00
// Stop provides a mock function with given fields:
func ( _m * MockScheduler ) Stop ( ) {
_m . Called ( )
}
// MockScheduler_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
type MockScheduler_Stop_Call struct {
* mock . Call
}
// Stop is a helper method to define mock.On call
func ( _e * MockScheduler_Expecter ) Stop ( ) * MockScheduler_Stop_Call {
return & MockScheduler_Stop_Call { Call : _e . mock . On ( "Stop" ) }
}
func ( _c * MockScheduler_Stop_Call ) Run ( run func ( ) ) * MockScheduler_Stop_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( )
} )
return _c
}
func ( _c * MockScheduler_Stop_Call ) Return ( ) * MockScheduler_Stop_Call {
_c . Call . Return ( )
return _c
}
2023-09-04 21:19:48 +08:00
func ( _c * MockScheduler_Stop_Call ) RunAndReturn ( run func ( ) ) * MockScheduler_Stop_Call {
_c . Call . Return ( run )
return _c
2022-09-15 18:48:32 +08:00
}
// NewMockScheduler creates a new instance of MockScheduler. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
2023-09-04 21:19:48 +08:00
// The first argument is typically a *testing.T value.
func NewMockScheduler ( t interface {
mock . TestingT
Cleanup ( func ( ) )
} ) * MockScheduler {
2022-09-15 18:48:32 +08:00
mock := & MockScheduler { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}