mirror of
https://gitee.com/milvus-io/milvus.git
synced 2024-12-02 11:59:00 +08:00
8aab6cbfac
1. Move the common modules of streamingNode and dataNode to flushcommon 2. Add new GetVChannels interface for rootcoord issue: https://github.com/milvus-io/milvus/issues/33285 --------- Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
99 lines
2.9 KiB
Go
99 lines
2.9 KiB
Go
// Code generated by mockery v2.32.4. DO NOT EDIT.
|
|
|
|
package syncmgr
|
|
|
|
import (
|
|
context "context"
|
|
|
|
conc "github.com/milvus-io/milvus/pkg/util/conc"
|
|
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// 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}
|
|
}
|
|
|
|
// SyncData provides a mock function with given fields: ctx, task, callbacks
|
|
func (_m *MockSyncManager) SyncData(ctx context.Context, task Task, callbacks ...func(error) error) *conc.Future[struct{}] {
|
|
_va := make([]interface{}, len(callbacks))
|
|
for _i := range callbacks {
|
|
_va[_i] = callbacks[_i]
|
|
}
|
|
var _ca []interface{}
|
|
_ca = append(_ca, ctx, task)
|
|
_ca = append(_ca, _va...)
|
|
ret := _m.Called(_ca...)
|
|
|
|
var r0 *conc.Future[struct{}]
|
|
if rf, ok := ret.Get(0).(func(context.Context, Task, ...func(error) error) *conc.Future[struct{}]); ok {
|
|
r0 = rf(ctx, task, callbacks...)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(*conc.Future[struct{}])
|
|
}
|
|
}
|
|
|
|
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 Task
|
|
// - callbacks ...func(error) error
|
|
func (_e *MockSyncManager_Expecter) SyncData(ctx interface{}, task interface{}, callbacks ...interface{}) *MockSyncManager_SyncData_Call {
|
|
return &MockSyncManager_SyncData_Call{Call: _e.mock.On("SyncData",
|
|
append([]interface{}{ctx, task}, callbacks...)...)}
|
|
}
|
|
|
|
func (_c *MockSyncManager_SyncData_Call) Run(run func(ctx context.Context, task Task, callbacks ...func(error) error)) *MockSyncManager_SyncData_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
variadicArgs := make([]func(error) error, len(args)-2)
|
|
for i, a := range args[2:] {
|
|
if a != nil {
|
|
variadicArgs[i] = a.(func(error) error)
|
|
}
|
|
}
|
|
run(args[0].(context.Context), args[1].(Task), variadicArgs...)
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockSyncManager_SyncData_Call) Return(_a0 *conc.Future[struct{}]) *MockSyncManager_SyncData_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockSyncManager_SyncData_Call) RunAndReturn(run func(context.Context, Task, ...func(error) error) *conc.Future[struct{}]) *MockSyncManager_SyncData_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
|
|
}
|