From 8a09106c112f35e1abf20f1db7e1c84aa3dde872 Mon Sep 17 00:00:00 2001 From: Dmitry Verkhoturov Date: Tue, 5 Nov 2019 13:57:49 +0100 Subject: [PATCH] fix incorrect SetTopicMetadata name mentions (introduced in 2052bd9) --- mocks/consumer.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/mocks/consumer.go b/mocks/consumer.go index 003d4d3e2..451eb08d0 100644 --- a/mocks/consumer.go +++ b/mocks/consumer.go @@ -63,13 +63,13 @@ func (c *Consumer) ConsumePartition(topic string, partition int32, offset int64) return pc, nil } -// Topics returns a list of topics, as registered with SetMetadata +// Topics returns a list of topics, as registered with SetTopicMetadata func (c *Consumer) Topics() ([]string, error) { c.l.Lock() defer c.l.Unlock() if c.metadata == nil { - c.t.Errorf("Unexpected call to Topics. Initialize the mock's topic metadata with SetMetadata.") + c.t.Errorf("Unexpected call to Topics. Initialize the mock's topic metadata with SetTopicMetadata.") return nil, sarama.ErrOutOfBrokers } @@ -80,13 +80,13 @@ func (c *Consumer) Topics() ([]string, error) { return result, nil } -// Partitions returns the list of parititons for the given topic, as registered with SetMetadata +// Partitions returns the list of parititons for the given topic, as registered with SetTopicMetadata func (c *Consumer) Partitions(topic string) ([]int32, error) { c.l.Lock() defer c.l.Unlock() if c.metadata == nil { - c.t.Errorf("Unexpected call to Partitions. Initialize the mock's topic metadata with SetMetadata.") + c.t.Errorf("Unexpected call to Partitions. Initialize the mock's topic metadata with SetTopicMetadata.") return nil, sarama.ErrOutOfBrokers } if c.metadata[topic] == nil {