mirror of
https://gitee.com/milvus-io/milvus.git
synced 2026-01-05 18:31:59 +08:00
issue: #33285 - use reader but not consumer for pulsar - advanced test framework - move some streaming related package into pkg --------- Signed-off-by: chyezh <chyezh@outlook.com>
169 lines
5.8 KiB
Go
169 lines
5.8 KiB
Go
// Code generated by mockery v2.32.4. DO NOT EDIT.
|
|
|
|
package mock_walimpls
|
|
|
|
import (
|
|
context "context"
|
|
|
|
message "github.com/milvus-io/milvus/pkg/streaming/util/message"
|
|
mock "github.com/stretchr/testify/mock"
|
|
)
|
|
|
|
// MockInterceptorWithReady is an autogenerated mock type for the InterceptorWithReady type
|
|
type MockInterceptorWithReady struct {
|
|
mock.Mock
|
|
}
|
|
|
|
type MockInterceptorWithReady_Expecter struct {
|
|
mock *mock.Mock
|
|
}
|
|
|
|
func (_m *MockInterceptorWithReady) EXPECT() *MockInterceptorWithReady_Expecter {
|
|
return &MockInterceptorWithReady_Expecter{mock: &_m.Mock}
|
|
}
|
|
|
|
// Close provides a mock function with given fields:
|
|
func (_m *MockInterceptorWithReady) Close() {
|
|
_m.Called()
|
|
}
|
|
|
|
// MockInterceptorWithReady_Close_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Close'
|
|
type MockInterceptorWithReady_Close_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Close is a helper method to define mock.On call
|
|
func (_e *MockInterceptorWithReady_Expecter) Close() *MockInterceptorWithReady_Close_Call {
|
|
return &MockInterceptorWithReady_Close_Call{Call: _e.mock.On("Close")}
|
|
}
|
|
|
|
func (_c *MockInterceptorWithReady_Close_Call) Run(run func()) *MockInterceptorWithReady_Close_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockInterceptorWithReady_Close_Call) Return() *MockInterceptorWithReady_Close_Call {
|
|
_c.Call.Return()
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockInterceptorWithReady_Close_Call) RunAndReturn(run func()) *MockInterceptorWithReady_Close_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// DoAppend provides a mock function with given fields: ctx, msg, append
|
|
func (_m *MockInterceptorWithReady) DoAppend(ctx context.Context, msg message.MutableMessage, append func(context.Context, message.MutableMessage) (message.MessageID, error)) (message.MessageID, error) {
|
|
ret := _m.Called(ctx, msg, append)
|
|
|
|
var r0 message.MessageID
|
|
var r1 error
|
|
if rf, ok := ret.Get(0).(func(context.Context, message.MutableMessage, func(context.Context, message.MutableMessage) (message.MessageID, error)) (message.MessageID, error)); ok {
|
|
return rf(ctx, msg, append)
|
|
}
|
|
if rf, ok := ret.Get(0).(func(context.Context, message.MutableMessage, func(context.Context, message.MutableMessage) (message.MessageID, error)) message.MessageID); ok {
|
|
r0 = rf(ctx, msg, append)
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(message.MessageID)
|
|
}
|
|
}
|
|
|
|
if rf, ok := ret.Get(1).(func(context.Context, message.MutableMessage, func(context.Context, message.MutableMessage) (message.MessageID, error)) error); ok {
|
|
r1 = rf(ctx, msg, append)
|
|
} else {
|
|
r1 = ret.Error(1)
|
|
}
|
|
|
|
return r0, r1
|
|
}
|
|
|
|
// MockInterceptorWithReady_DoAppend_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DoAppend'
|
|
type MockInterceptorWithReady_DoAppend_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// DoAppend is a helper method to define mock.On call
|
|
// - ctx context.Context
|
|
// - msg message.MutableMessage
|
|
// - append func(context.Context , message.MutableMessage)(message.MessageID , error)
|
|
func (_e *MockInterceptorWithReady_Expecter) DoAppend(ctx interface{}, msg interface{}, append interface{}) *MockInterceptorWithReady_DoAppend_Call {
|
|
return &MockInterceptorWithReady_DoAppend_Call{Call: _e.mock.On("DoAppend", ctx, msg, append)}
|
|
}
|
|
|
|
func (_c *MockInterceptorWithReady_DoAppend_Call) Run(run func(ctx context.Context, msg message.MutableMessage, append func(context.Context, message.MutableMessage) (message.MessageID, error))) *MockInterceptorWithReady_DoAppend_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run(args[0].(context.Context), args[1].(message.MutableMessage), args[2].(func(context.Context, message.MutableMessage) (message.MessageID, error)))
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockInterceptorWithReady_DoAppend_Call) Return(_a0 message.MessageID, _a1 error) *MockInterceptorWithReady_DoAppend_Call {
|
|
_c.Call.Return(_a0, _a1)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockInterceptorWithReady_DoAppend_Call) RunAndReturn(run func(context.Context, message.MutableMessage, func(context.Context, message.MutableMessage) (message.MessageID, error)) (message.MessageID, error)) *MockInterceptorWithReady_DoAppend_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// Ready provides a mock function with given fields:
|
|
func (_m *MockInterceptorWithReady) Ready() <-chan struct{} {
|
|
ret := _m.Called()
|
|
|
|
var r0 <-chan struct{}
|
|
if rf, ok := ret.Get(0).(func() <-chan struct{}); ok {
|
|
r0 = rf()
|
|
} else {
|
|
if ret.Get(0) != nil {
|
|
r0 = ret.Get(0).(<-chan struct{})
|
|
}
|
|
}
|
|
|
|
return r0
|
|
}
|
|
|
|
// MockInterceptorWithReady_Ready_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Ready'
|
|
type MockInterceptorWithReady_Ready_Call struct {
|
|
*mock.Call
|
|
}
|
|
|
|
// Ready is a helper method to define mock.On call
|
|
func (_e *MockInterceptorWithReady_Expecter) Ready() *MockInterceptorWithReady_Ready_Call {
|
|
return &MockInterceptorWithReady_Ready_Call{Call: _e.mock.On("Ready")}
|
|
}
|
|
|
|
func (_c *MockInterceptorWithReady_Ready_Call) Run(run func()) *MockInterceptorWithReady_Ready_Call {
|
|
_c.Call.Run(func(args mock.Arguments) {
|
|
run()
|
|
})
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockInterceptorWithReady_Ready_Call) Return(_a0 <-chan struct{}) *MockInterceptorWithReady_Ready_Call {
|
|
_c.Call.Return(_a0)
|
|
return _c
|
|
}
|
|
|
|
func (_c *MockInterceptorWithReady_Ready_Call) RunAndReturn(run func() <-chan struct{}) *MockInterceptorWithReady_Ready_Call {
|
|
_c.Call.Return(run)
|
|
return _c
|
|
}
|
|
|
|
// NewMockInterceptorWithReady creates a new instance of MockInterceptorWithReady. 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 NewMockInterceptorWithReady(t interface {
|
|
mock.TestingT
|
|
Cleanup(func())
|
|
}) *MockInterceptorWithReady {
|
|
mock := &MockInterceptorWithReady{}
|
|
mock.Mock.Test(t)
|
|
|
|
t.Cleanup(func() { mock.AssertExpectations(t) })
|
|
|
|
return mock
|
|
}
|