MCPcopy
hub / github.com/IBM/sarama / ExpectSendMessageAndFail

Method ExpectSendMessageAndFail

mocks/sync_producer.go:221–225  ·  view source on GitHub ↗

ExpectSendMessageAndFail sets an expectation on the mock producer that SendMessage will be called. The mock producer will handle the message as if it failed to produce successfully, i.e. by returning the provided error.

(err error)

Source from the content-addressed store, hash-verified

219// called. The mock producer will handle the message as if it failed to produce
220// successfully, i.e. by returning the provided error.
221func (sp *SyncProducer) ExpectSendMessageAndFail(err error) *SyncProducer {
222 sp.ExpectSendMessageWithMessageCheckerFunctionAndFail(nil, err)
223
224 return sp
225}
226
227func (sp *SyncProducer) IsTransactional() bool {
228 return sp.isTransactional

Implementers 2

syncProducersync_producer.go
SyncProducermocks/sync_producer.go