From c4aa0f78148f2c4a7c7ea05ec1ef976ffa1bdb25 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Thu, 22 Feb 2018 13:50:48 -0800 Subject: [PATCH] [hot fix] errNotAvailable => errNotAvailableWithGroup --- reader.go | 1 - reader_test.go | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/reader.go b/reader.go index 375026604..61fd5ca30 100644 --- a/reader.go +++ b/reader.go @@ -28,7 +28,6 @@ const ( ) var ( - // errNotAvailable returned when func called that is not supported in cluster mode errOnlyAvailableWithGroup = errors.New("unavailable when GroupID is not set") errNotAvailableWithGroup = errors.New("unavailable when GroupID is set") ) diff --git a/reader_test.go b/reader_test.go index fa9e8542f..27bba533a 100644 --- a/reader_test.go +++ b/reader_test.go @@ -502,8 +502,8 @@ func testConsumerGroupSimple(t *testing.T, ctx context.Context, r *Reader) { func TestReaderSetOffsetWhenConsumerGroupsEnabled(t *testing.T) { r := &Reader{config: ReaderConfig{GroupID: "not-zero"}} - if err := r.SetOffset(-1); err != errNotAvailable { - t.Fatalf("expected %v; got %v", errNotAvailable, err) + if err := r.SetOffset(-1); err != errNotAvailableWithGroup { + t.Fatalf("expected %v; got %v", errNotAvailableWithGroup, err) } }