Skip to content

Commit

Permalink
fix: disable error wrapping check in test
Browse files Browse the repository at this point in the history
  • Loading branch information
ae-govau committed Apr 9, 2024
1 parent 7f32943 commit caf4a47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions sync_producer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ func TestSyncProducer(t *testing.T) {
Value: ByteEncoder(make([]byte, config.Producer.MaxMessageBytes+1)), // will exceed default max size, e.g. configuration side
Metadata: "test",
})
if err != ErrMessageSizeTooLarge {
t.Error("expected err to be ErrMessageSizeTooLarge - many people rely on this, please do not change with searching for previous discussions")
if err != ErrMessageSizeTooLarge { //nolint:errorlint // linter complains that we use errors.Is(), but we know code bases out there don't, so this test is specifically to test that we don't wrap this
t.Error("expected err to be ErrMessageSizeTooLarge - many people rely on this, please do not change without searching for previous discussions")
}

// try to send small message the server rejects because too large
Expand All @@ -77,8 +77,8 @@ func TestSyncProducer(t *testing.T) {
Value: StringEncoder(TestMessage),
Metadata: "test",
})
if err != ErrMessageSizeTooLarge {
t.Error("expected err to be ErrMessageSizeTooLarge - many people rely on this, please do not change with searching for previous discussions")
if err != ErrMessageSizeTooLarge { //nolint:errorlint // linter complains that we use errors.Is(), but we know code bases out there don't, so this test is specifically to test that we don't wrap this
t.Error("expected err to be ErrMessageSizeTooLarge - many people rely on this, please do not change without searching for previous discussions")
}

safeClose(t, producer)
Expand Down

0 comments on commit caf4a47

Please sign in to comment.