2023-11-04 12:10:17 +08:00
// Code generated by mockery v2.32.4. DO NOT EDIT.
package syncmgr
import (
context "context"
2023-11-15 15:24:18 +08:00
conc "github.com/milvus-io/milvus/pkg/util/conc"
2023-11-04 12:10:17 +08:00
mock "github.com/stretchr/testify/mock"
2023-11-15 15:24:18 +08:00
msgpb "github.com/milvus-io/milvus-proto/go-api/v2/msgpb"
2023-11-04 12:10:17 +08:00
)
// MockSyncManager is an autogenerated mock type for the SyncManager type
type MockSyncManager struct {
mock . Mock
}
type MockSyncManager_Expecter struct {
mock * mock . Mock
}
func ( _m * MockSyncManager ) EXPECT ( ) * MockSyncManager_Expecter {
return & MockSyncManager_Expecter { mock : & _m . Mock }
}
// Block provides a mock function with given fields: segmentID
func ( _m * MockSyncManager ) Block ( segmentID int64 ) {
_m . Called ( segmentID )
}
// MockSyncManager_Block_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Block'
type MockSyncManager_Block_Call struct {
* mock . Call
}
// Block is a helper method to define mock.On call
// - segmentID int64
func ( _e * MockSyncManager_Expecter ) Block ( segmentID interface { } ) * MockSyncManager_Block_Call {
return & MockSyncManager_Block_Call { Call : _e . mock . On ( "Block" , segmentID ) }
}
func ( _c * MockSyncManager_Block_Call ) Run ( run func ( segmentID int64 ) ) * MockSyncManager_Block_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( args [ 0 ] . ( int64 ) )
} )
return _c
}
func ( _c * MockSyncManager_Block_Call ) Return ( ) * MockSyncManager_Block_Call {
_c . Call . Return ( )
return _c
}
func ( _c * MockSyncManager_Block_Call ) RunAndReturn ( run func ( int64 ) ) * MockSyncManager_Block_Call {
_c . Call . Return ( run )
return _c
}
2023-11-15 15:24:18 +08:00
// GetMinCheckpoints provides a mock function with given fields: channel
func ( _m * MockSyncManager ) GetMinCheckpoints ( channel string ) * msgpb . MsgPosition {
ret := _m . Called ( channel )
var r0 * msgpb . MsgPosition
if rf , ok := ret . Get ( 0 ) . ( func ( string ) * msgpb . MsgPosition ) ; ok {
r0 = rf ( channel )
} else {
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * msgpb . MsgPosition )
}
}
return r0
}
// MockSyncManager_GetMinCheckpoints_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMinCheckpoints'
type MockSyncManager_GetMinCheckpoints_Call struct {
* mock . Call
}
// GetMinCheckpoints is a helper method to define mock.On call
// - channel string
func ( _e * MockSyncManager_Expecter ) GetMinCheckpoints ( channel interface { } ) * MockSyncManager_GetMinCheckpoints_Call {
return & MockSyncManager_GetMinCheckpoints_Call { Call : _e . mock . On ( "GetMinCheckpoints" , channel ) }
}
func ( _c * MockSyncManager_GetMinCheckpoints_Call ) Run ( run func ( channel string ) ) * MockSyncManager_GetMinCheckpoints_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( args [ 0 ] . ( string ) )
} )
return _c
}
func ( _c * MockSyncManager_GetMinCheckpoints_Call ) Return ( _a0 * msgpb . MsgPosition ) * MockSyncManager_GetMinCheckpoints_Call {
_c . Call . Return ( _a0 )
return _c
}
func ( _c * MockSyncManager_GetMinCheckpoints_Call ) RunAndReturn ( run func ( string ) * msgpb . MsgPosition ) * MockSyncManager_GetMinCheckpoints_Call {
_c . Call . Return ( run )
return _c
}
2023-11-04 12:10:17 +08:00
// SyncData provides a mock function with given fields: ctx, task
2023-11-15 15:24:18 +08:00
func ( _m * MockSyncManager ) SyncData ( ctx context . Context , task * SyncTask ) * conc . Future [ error ] {
2023-11-04 12:10:17 +08:00
ret := _m . Called ( ctx , task )
2023-11-15 15:24:18 +08:00
var r0 * conc . Future [ error ]
if rf , ok := ret . Get ( 0 ) . ( func ( context . Context , * SyncTask ) * conc . Future [ error ] ) ; ok {
2023-11-04 12:10:17 +08:00
r0 = rf ( ctx , task )
} else {
2023-11-15 15:24:18 +08:00
if ret . Get ( 0 ) != nil {
r0 = ret . Get ( 0 ) . ( * conc . Future [ error ] )
}
2023-11-04 12:10:17 +08:00
}
return r0
}
// MockSyncManager_SyncData_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SyncData'
type MockSyncManager_SyncData_Call struct {
* mock . Call
}
// SyncData is a helper method to define mock.On call
// - ctx context.Context
// - task *SyncTask
func ( _e * MockSyncManager_Expecter ) SyncData ( ctx interface { } , task interface { } ) * MockSyncManager_SyncData_Call {
return & MockSyncManager_SyncData_Call { Call : _e . mock . On ( "SyncData" , ctx , task ) }
}
func ( _c * MockSyncManager_SyncData_Call ) Run ( run func ( ctx context . Context , task * SyncTask ) ) * MockSyncManager_SyncData_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( args [ 0 ] . ( context . Context ) , args [ 1 ] . ( * SyncTask ) )
} )
return _c
}
2023-11-15 15:24:18 +08:00
func ( _c * MockSyncManager_SyncData_Call ) Return ( _a0 * conc . Future [ error ] ) * MockSyncManager_SyncData_Call {
2023-11-04 12:10:17 +08:00
_c . Call . Return ( _a0 )
return _c
}
2023-11-15 15:24:18 +08:00
func ( _c * MockSyncManager_SyncData_Call ) RunAndReturn ( run func ( context . Context , * SyncTask ) * conc . Future [ error ] ) * MockSyncManager_SyncData_Call {
2023-11-04 12:10:17 +08:00
_c . Call . Return ( run )
return _c
}
// Unblock provides a mock function with given fields: segmentID
func ( _m * MockSyncManager ) Unblock ( segmentID int64 ) {
_m . Called ( segmentID )
}
// MockSyncManager_Unblock_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Unblock'
type MockSyncManager_Unblock_Call struct {
* mock . Call
}
// Unblock is a helper method to define mock.On call
// - segmentID int64
func ( _e * MockSyncManager_Expecter ) Unblock ( segmentID interface { } ) * MockSyncManager_Unblock_Call {
return & MockSyncManager_Unblock_Call { Call : _e . mock . On ( "Unblock" , segmentID ) }
}
func ( _c * MockSyncManager_Unblock_Call ) Run ( run func ( segmentID int64 ) ) * MockSyncManager_Unblock_Call {
_c . Call . Run ( func ( args mock . Arguments ) {
run ( args [ 0 ] . ( int64 ) )
} )
return _c
}
func ( _c * MockSyncManager_Unblock_Call ) Return ( ) * MockSyncManager_Unblock_Call {
_c . Call . Return ( )
return _c
}
func ( _c * MockSyncManager_Unblock_Call ) RunAndReturn ( run func ( int64 ) ) * MockSyncManager_Unblock_Call {
_c . Call . Return ( run )
return _c
}
// NewMockSyncManager creates a new instance of MockSyncManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
// The first argument is typically a *testing.T value.
func NewMockSyncManager ( t interface {
mock . TestingT
Cleanup ( func ( ) )
} ) * MockSyncManager {
mock := & MockSyncManager { }
mock . Mock . Test ( t )
t . Cleanup ( func ( ) { mock . AssertExpectations ( t ) } )
return mock
}