From 9282d75ef4e98036baf8595bf538ae0fe14fa524 Mon Sep 17 00:00:00 2001 From: hsweif Date: Fri, 11 Nov 2022 16:21:12 +0800 Subject: [PATCH] fix(doc): add missing doc for mock consumer The mock SetTopicMetadata entry stopped mid sentence, add remaining details. Fixes: #2374 Signed-off-by: hsweif --- mocks/consumer.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mocks/consumer.go b/mocks/consumer.go index f487b54d7..ecd0bbcb6 100644 --- a/mocks/consumer.go +++ b/mocks/consumer.go @@ -204,8 +204,10 @@ func (c *Consumer) SetTopicMetadata(metadata map[string][]int32) { // The registered PartitionConsumer will be returned, so you can set expectations // on it using method chaining. Once a topic/partition is registered, you are // expected to start consuming it using ConsumePartition. If that doesn't happen, -// an error will be written to the error reporter once the mock consumer is closed. It will -// also expect that the +// an error will be written to the error reporter once the mock consumer is closed. It also expects +// that the message and error channels be written with YieldMessage and YieldError accordingly, +// and be fully consumed once the mock consumer is closed if ExpectMessagesDrainedOnClose or +// ExpectErrorsDrainedOnClose have been called. func (c *Consumer) ExpectConsumePartition(topic string, partition int32, offset int64) *PartitionConsumer { c.l.Lock() defer c.l.Unlock()