milvus/pkg/mocks/streaming/util/mock_message/mock_BroadcastMutableMessage.go
yihao.dai e6da4a64b5
fix: Pre-check import message to prevent pipeline block indefinitely (#42415)
Pre-check import message to prevent pipeline block indefinitely.

issue: https://github.com/milvus-io/milvus/issues/42414

---------

Signed-off-by: bigsheeper <yihao.dai@zilliz.com>
Co-authored-by: chyezh <chyezh@outlook.com>
2025-06-11 13:40:38 +08:00

637 lines
20 KiB
Go

// Code generated by mockery v2.53.3. DO NOT EDIT.
package mock_message
import (
message "github.com/milvus-io/milvus/pkg/v2/streaming/util/message"
mock "github.com/stretchr/testify/mock"
zapcore "go.uber.org/zap/zapcore"
)
// MockBroadcastMutableMessage is an autogenerated mock type for the BroadcastMutableMessage type
type MockBroadcastMutableMessage struct {
mock.Mock
}
type MockBroadcastMutableMessage_Expecter struct {
mock *mock.Mock
}
func (_m *MockBroadcastMutableMessage) EXPECT() *MockBroadcastMutableMessage_Expecter {
return &MockBroadcastMutableMessage_Expecter{mock: &_m.Mock}
}
// BarrierTimeTick provides a mock function with no fields
func (_m *MockBroadcastMutableMessage) BarrierTimeTick() uint64 {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for BarrierTimeTick")
}
var r0 uint64
if rf, ok := ret.Get(0).(func() uint64); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(uint64)
}
return r0
}
// MockBroadcastMutableMessage_BarrierTimeTick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BarrierTimeTick'
type MockBroadcastMutableMessage_BarrierTimeTick_Call struct {
*mock.Call
}
// BarrierTimeTick is a helper method to define mock.On call
func (_e *MockBroadcastMutableMessage_Expecter) BarrierTimeTick() *MockBroadcastMutableMessage_BarrierTimeTick_Call {
return &MockBroadcastMutableMessage_BarrierTimeTick_Call{Call: _e.mock.On("BarrierTimeTick")}
}
func (_c *MockBroadcastMutableMessage_BarrierTimeTick_Call) Run(run func()) *MockBroadcastMutableMessage_BarrierTimeTick_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockBroadcastMutableMessage_BarrierTimeTick_Call) Return(_a0 uint64) *MockBroadcastMutableMessage_BarrierTimeTick_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_BarrierTimeTick_Call) RunAndReturn(run func() uint64) *MockBroadcastMutableMessage_BarrierTimeTick_Call {
_c.Call.Return(run)
return _c
}
// BroadcastHeader provides a mock function with no fields
func (_m *MockBroadcastMutableMessage) BroadcastHeader() *message.BroadcastHeader {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for BroadcastHeader")
}
var r0 *message.BroadcastHeader
if rf, ok := ret.Get(0).(func() *message.BroadcastHeader); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*message.BroadcastHeader)
}
}
return r0
}
// MockBroadcastMutableMessage_BroadcastHeader_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'BroadcastHeader'
type MockBroadcastMutableMessage_BroadcastHeader_Call struct {
*mock.Call
}
// BroadcastHeader is a helper method to define mock.On call
func (_e *MockBroadcastMutableMessage_Expecter) BroadcastHeader() *MockBroadcastMutableMessage_BroadcastHeader_Call {
return &MockBroadcastMutableMessage_BroadcastHeader_Call{Call: _e.mock.On("BroadcastHeader")}
}
func (_c *MockBroadcastMutableMessage_BroadcastHeader_Call) Run(run func()) *MockBroadcastMutableMessage_BroadcastHeader_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockBroadcastMutableMessage_BroadcastHeader_Call) Return(_a0 *message.BroadcastHeader) *MockBroadcastMutableMessage_BroadcastHeader_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_BroadcastHeader_Call) RunAndReturn(run func() *message.BroadcastHeader) *MockBroadcastMutableMessage_BroadcastHeader_Call {
_c.Call.Return(run)
return _c
}
// EstimateSize provides a mock function with no fields
func (_m *MockBroadcastMutableMessage) EstimateSize() int {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for EstimateSize")
}
var r0 int
if rf, ok := ret.Get(0).(func() int); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(int)
}
return r0
}
// MockBroadcastMutableMessage_EstimateSize_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'EstimateSize'
type MockBroadcastMutableMessage_EstimateSize_Call struct {
*mock.Call
}
// EstimateSize is a helper method to define mock.On call
func (_e *MockBroadcastMutableMessage_Expecter) EstimateSize() *MockBroadcastMutableMessage_EstimateSize_Call {
return &MockBroadcastMutableMessage_EstimateSize_Call{Call: _e.mock.On("EstimateSize")}
}
func (_c *MockBroadcastMutableMessage_EstimateSize_Call) Run(run func()) *MockBroadcastMutableMessage_EstimateSize_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockBroadcastMutableMessage_EstimateSize_Call) Return(_a0 int) *MockBroadcastMutableMessage_EstimateSize_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_EstimateSize_Call) RunAndReturn(run func() int) *MockBroadcastMutableMessage_EstimateSize_Call {
_c.Call.Return(run)
return _c
}
// IsPersisted provides a mock function with no fields
func (_m *MockBroadcastMutableMessage) IsPersisted() bool {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for IsPersisted")
}
var r0 bool
if rf, ok := ret.Get(0).(func() bool); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(bool)
}
return r0
}
// MockBroadcastMutableMessage_IsPersisted_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'IsPersisted'
type MockBroadcastMutableMessage_IsPersisted_Call struct {
*mock.Call
}
// IsPersisted is a helper method to define mock.On call
func (_e *MockBroadcastMutableMessage_Expecter) IsPersisted() *MockBroadcastMutableMessage_IsPersisted_Call {
return &MockBroadcastMutableMessage_IsPersisted_Call{Call: _e.mock.On("IsPersisted")}
}
func (_c *MockBroadcastMutableMessage_IsPersisted_Call) Run(run func()) *MockBroadcastMutableMessage_IsPersisted_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockBroadcastMutableMessage_IsPersisted_Call) Return(_a0 bool) *MockBroadcastMutableMessage_IsPersisted_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_IsPersisted_Call) RunAndReturn(run func() bool) *MockBroadcastMutableMessage_IsPersisted_Call {
_c.Call.Return(run)
return _c
}
// MarshalLogObject provides a mock function with given fields: _a0
func (_m *MockBroadcastMutableMessage) MarshalLogObject(_a0 zapcore.ObjectEncoder) error {
ret := _m.Called(_a0)
if len(ret) == 0 {
panic("no return value specified for MarshalLogObject")
}
var r0 error
if rf, ok := ret.Get(0).(func(zapcore.ObjectEncoder) error); ok {
r0 = rf(_a0)
} else {
r0 = ret.Error(0)
}
return r0
}
// MockBroadcastMutableMessage_MarshalLogObject_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MarshalLogObject'
type MockBroadcastMutableMessage_MarshalLogObject_Call struct {
*mock.Call
}
// MarshalLogObject is a helper method to define mock.On call
// - _a0 zapcore.ObjectEncoder
func (_e *MockBroadcastMutableMessage_Expecter) MarshalLogObject(_a0 interface{}) *MockBroadcastMutableMessage_MarshalLogObject_Call {
return &MockBroadcastMutableMessage_MarshalLogObject_Call{Call: _e.mock.On("MarshalLogObject", _a0)}
}
func (_c *MockBroadcastMutableMessage_MarshalLogObject_Call) Run(run func(_a0 zapcore.ObjectEncoder)) *MockBroadcastMutableMessage_MarshalLogObject_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(zapcore.ObjectEncoder))
})
return _c
}
func (_c *MockBroadcastMutableMessage_MarshalLogObject_Call) Return(_a0 error) *MockBroadcastMutableMessage_MarshalLogObject_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_MarshalLogObject_Call) RunAndReturn(run func(zapcore.ObjectEncoder) error) *MockBroadcastMutableMessage_MarshalLogObject_Call {
_c.Call.Return(run)
return _c
}
// MessageType provides a mock function with no fields
func (_m *MockBroadcastMutableMessage) MessageType() message.MessageType {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for MessageType")
}
var r0 message.MessageType
if rf, ok := ret.Get(0).(func() message.MessageType); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(message.MessageType)
}
return r0
}
// MockBroadcastMutableMessage_MessageType_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'MessageType'
type MockBroadcastMutableMessage_MessageType_Call struct {
*mock.Call
}
// MessageType is a helper method to define mock.On call
func (_e *MockBroadcastMutableMessage_Expecter) MessageType() *MockBroadcastMutableMessage_MessageType_Call {
return &MockBroadcastMutableMessage_MessageType_Call{Call: _e.mock.On("MessageType")}
}
func (_c *MockBroadcastMutableMessage_MessageType_Call) Run(run func()) *MockBroadcastMutableMessage_MessageType_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockBroadcastMutableMessage_MessageType_Call) Return(_a0 message.MessageType) *MockBroadcastMutableMessage_MessageType_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_MessageType_Call) RunAndReturn(run func() message.MessageType) *MockBroadcastMutableMessage_MessageType_Call {
_c.Call.Return(run)
return _c
}
// Payload provides a mock function with no fields
func (_m *MockBroadcastMutableMessage) Payload() []byte {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Payload")
}
var r0 []byte
if rf, ok := ret.Get(0).(func() []byte); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]byte)
}
}
return r0
}
// MockBroadcastMutableMessage_Payload_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Payload'
type MockBroadcastMutableMessage_Payload_Call struct {
*mock.Call
}
// Payload is a helper method to define mock.On call
func (_e *MockBroadcastMutableMessage_Expecter) Payload() *MockBroadcastMutableMessage_Payload_Call {
return &MockBroadcastMutableMessage_Payload_Call{Call: _e.mock.On("Payload")}
}
func (_c *MockBroadcastMutableMessage_Payload_Call) Run(run func()) *MockBroadcastMutableMessage_Payload_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockBroadcastMutableMessage_Payload_Call) Return(_a0 []byte) *MockBroadcastMutableMessage_Payload_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_Payload_Call) RunAndReturn(run func() []byte) *MockBroadcastMutableMessage_Payload_Call {
_c.Call.Return(run)
return _c
}
// Properties provides a mock function with no fields
func (_m *MockBroadcastMutableMessage) Properties() message.RProperties {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Properties")
}
var r0 message.RProperties
if rf, ok := ret.Get(0).(func() message.RProperties); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(message.RProperties)
}
}
return r0
}
// MockBroadcastMutableMessage_Properties_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Properties'
type MockBroadcastMutableMessage_Properties_Call struct {
*mock.Call
}
// Properties is a helper method to define mock.On call
func (_e *MockBroadcastMutableMessage_Expecter) Properties() *MockBroadcastMutableMessage_Properties_Call {
return &MockBroadcastMutableMessage_Properties_Call{Call: _e.mock.On("Properties")}
}
func (_c *MockBroadcastMutableMessage_Properties_Call) Run(run func()) *MockBroadcastMutableMessage_Properties_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockBroadcastMutableMessage_Properties_Call) Return(_a0 message.RProperties) *MockBroadcastMutableMessage_Properties_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_Properties_Call) RunAndReturn(run func() message.RProperties) *MockBroadcastMutableMessage_Properties_Call {
_c.Call.Return(run)
return _c
}
// SplitIntoMutableMessage provides a mock function with no fields
func (_m *MockBroadcastMutableMessage) SplitIntoMutableMessage() []message.MutableMessage {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for SplitIntoMutableMessage")
}
var r0 []message.MutableMessage
if rf, ok := ret.Get(0).(func() []message.MutableMessage); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).([]message.MutableMessage)
}
}
return r0
}
// MockBroadcastMutableMessage_SplitIntoMutableMessage_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SplitIntoMutableMessage'
type MockBroadcastMutableMessage_SplitIntoMutableMessage_Call struct {
*mock.Call
}
// SplitIntoMutableMessage is a helper method to define mock.On call
func (_e *MockBroadcastMutableMessage_Expecter) SplitIntoMutableMessage() *MockBroadcastMutableMessage_SplitIntoMutableMessage_Call {
return &MockBroadcastMutableMessage_SplitIntoMutableMessage_Call{Call: _e.mock.On("SplitIntoMutableMessage")}
}
func (_c *MockBroadcastMutableMessage_SplitIntoMutableMessage_Call) Run(run func()) *MockBroadcastMutableMessage_SplitIntoMutableMessage_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockBroadcastMutableMessage_SplitIntoMutableMessage_Call) Return(_a0 []message.MutableMessage) *MockBroadcastMutableMessage_SplitIntoMutableMessage_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_SplitIntoMutableMessage_Call) RunAndReturn(run func() []message.MutableMessage) *MockBroadcastMutableMessage_SplitIntoMutableMessage_Call {
_c.Call.Return(run)
return _c
}
// TimeTick provides a mock function with no fields
func (_m *MockBroadcastMutableMessage) TimeTick() uint64 {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for TimeTick")
}
var r0 uint64
if rf, ok := ret.Get(0).(func() uint64); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(uint64)
}
return r0
}
// MockBroadcastMutableMessage_TimeTick_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TimeTick'
type MockBroadcastMutableMessage_TimeTick_Call struct {
*mock.Call
}
// TimeTick is a helper method to define mock.On call
func (_e *MockBroadcastMutableMessage_Expecter) TimeTick() *MockBroadcastMutableMessage_TimeTick_Call {
return &MockBroadcastMutableMessage_TimeTick_Call{Call: _e.mock.On("TimeTick")}
}
func (_c *MockBroadcastMutableMessage_TimeTick_Call) Run(run func()) *MockBroadcastMutableMessage_TimeTick_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockBroadcastMutableMessage_TimeTick_Call) Return(_a0 uint64) *MockBroadcastMutableMessage_TimeTick_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_TimeTick_Call) RunAndReturn(run func() uint64) *MockBroadcastMutableMessage_TimeTick_Call {
_c.Call.Return(run)
return _c
}
// TxnContext provides a mock function with no fields
func (_m *MockBroadcastMutableMessage) TxnContext() *message.TxnContext {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for TxnContext")
}
var r0 *message.TxnContext
if rf, ok := ret.Get(0).(func() *message.TxnContext); ok {
r0 = rf()
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(*message.TxnContext)
}
}
return r0
}
// MockBroadcastMutableMessage_TxnContext_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'TxnContext'
type MockBroadcastMutableMessage_TxnContext_Call struct {
*mock.Call
}
// TxnContext is a helper method to define mock.On call
func (_e *MockBroadcastMutableMessage_Expecter) TxnContext() *MockBroadcastMutableMessage_TxnContext_Call {
return &MockBroadcastMutableMessage_TxnContext_Call{Call: _e.mock.On("TxnContext")}
}
func (_c *MockBroadcastMutableMessage_TxnContext_Call) Run(run func()) *MockBroadcastMutableMessage_TxnContext_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockBroadcastMutableMessage_TxnContext_Call) Return(_a0 *message.TxnContext) *MockBroadcastMutableMessage_TxnContext_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_TxnContext_Call) RunAndReturn(run func() *message.TxnContext) *MockBroadcastMutableMessage_TxnContext_Call {
_c.Call.Return(run)
return _c
}
// Version provides a mock function with no fields
func (_m *MockBroadcastMutableMessage) Version() message.Version {
ret := _m.Called()
if len(ret) == 0 {
panic("no return value specified for Version")
}
var r0 message.Version
if rf, ok := ret.Get(0).(func() message.Version); ok {
r0 = rf()
} else {
r0 = ret.Get(0).(message.Version)
}
return r0
}
// MockBroadcastMutableMessage_Version_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Version'
type MockBroadcastMutableMessage_Version_Call struct {
*mock.Call
}
// Version is a helper method to define mock.On call
func (_e *MockBroadcastMutableMessage_Expecter) Version() *MockBroadcastMutableMessage_Version_Call {
return &MockBroadcastMutableMessage_Version_Call{Call: _e.mock.On("Version")}
}
func (_c *MockBroadcastMutableMessage_Version_Call) Run(run func()) *MockBroadcastMutableMessage_Version_Call {
_c.Call.Run(func(args mock.Arguments) {
run()
})
return _c
}
func (_c *MockBroadcastMutableMessage_Version_Call) Return(_a0 message.Version) *MockBroadcastMutableMessage_Version_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_Version_Call) RunAndReturn(run func() message.Version) *MockBroadcastMutableMessage_Version_Call {
_c.Call.Return(run)
return _c
}
// WithBroadcastID provides a mock function with given fields: broadcastID
func (_m *MockBroadcastMutableMessage) WithBroadcastID(broadcastID uint64) message.BroadcastMutableMessage {
ret := _m.Called(broadcastID)
if len(ret) == 0 {
panic("no return value specified for WithBroadcastID")
}
var r0 message.BroadcastMutableMessage
if rf, ok := ret.Get(0).(func(uint64) message.BroadcastMutableMessage); ok {
r0 = rf(broadcastID)
} else {
if ret.Get(0) != nil {
r0 = ret.Get(0).(message.BroadcastMutableMessage)
}
}
return r0
}
// MockBroadcastMutableMessage_WithBroadcastID_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'WithBroadcastID'
type MockBroadcastMutableMessage_WithBroadcastID_Call struct {
*mock.Call
}
// WithBroadcastID is a helper method to define mock.On call
// - broadcastID uint64
func (_e *MockBroadcastMutableMessage_Expecter) WithBroadcastID(broadcastID interface{}) *MockBroadcastMutableMessage_WithBroadcastID_Call {
return &MockBroadcastMutableMessage_WithBroadcastID_Call{Call: _e.mock.On("WithBroadcastID", broadcastID)}
}
func (_c *MockBroadcastMutableMessage_WithBroadcastID_Call) Run(run func(broadcastID uint64)) *MockBroadcastMutableMessage_WithBroadcastID_Call {
_c.Call.Run(func(args mock.Arguments) {
run(args[0].(uint64))
})
return _c
}
func (_c *MockBroadcastMutableMessage_WithBroadcastID_Call) Return(_a0 message.BroadcastMutableMessage) *MockBroadcastMutableMessage_WithBroadcastID_Call {
_c.Call.Return(_a0)
return _c
}
func (_c *MockBroadcastMutableMessage_WithBroadcastID_Call) RunAndReturn(run func(uint64) message.BroadcastMutableMessage) *MockBroadcastMutableMessage_WithBroadcastID_Call {
_c.Call.Return(run)
return _c
}
// NewMockBroadcastMutableMessage creates a new instance of MockBroadcastMutableMessage. 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 NewMockBroadcastMutableMessage(t interface {
mock.TestingT
Cleanup(func())
}) *MockBroadcastMutableMessage {
mock := &MockBroadcastMutableMessage{}
mock.Mock.Test(t)
t.Cleanup(func() { mock.AssertExpectations(t) })
return mock
}