Skip to content

Commit

Permalink
[hot fix] errNotAvailable => errNotAvailableWithGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
Achille Roussel committed Feb 22, 2018
1 parent f9bd146 commit c4aa0f7
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
1 change: 0 additions & 1 deletion reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
)
Expand Down
4 changes: 2 additions & 2 deletions reader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}

Expand Down

0 comments on commit c4aa0f7

Please sign in to comment.