Skip to content

Commit 54480cc

Browse files
fix: ensure mock SyncProducer's SendMessage returns msg.Partition instead of 0 (#3122)
Signed-off-by: Matteo Agius <[email protected]>
1 parent 0fb6d9a commit 54480cc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mocks/sync_producer.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ func (sp *SyncProducer) SendMessage(msg *sarama.ProducerMessage) (partition int3
8787
if errors.Is(expectation.Result, errProduceSuccess) {
8888
sp.lastOffset++
8989
msg.Offset = sp.lastOffset
90-
return 0, msg.Offset, nil
90+
return msg.Partition, msg.Offset, nil
9191
}
9292
return -1, -1, expectation.Result
9393
}

0 commit comments

Comments
 (0)