Skip to content
This repository was archived by the owner on Oct 7, 2022. It is now read-only.

Commit 83453b7

Browse files
author
João Assunção
committed
refactor(encode_decode_test): removes err checking from a test
1 parent 5557bfb commit 83453b7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/kafka/encode_decode_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ func TestDecoder_AvroMessageToRecord_NilMessageValue(t *testing.T) {
7878
func TestDecoder_AvroMessageToRecord_NilMessageValue_IncludeKey(t *testing.T) {
7979
d := &Decoder{CodecCache: sync.Map{}}
8080
key := dummyKey{"marco"}
81-
jsonBytesKey, err := json.Marshal(key)
81+
jsonBytesKey, _ := json.Marshal(key)
8282
record, err := d.AvroMessageToRecord(context.Background(), &sarama.ConsumerMessage{
8383
Value: nil,
8484
Key: jsonBytesKey,
@@ -98,8 +98,8 @@ func TestDecoder_JsonMessageToRecord_IncludeKey(t *testing.T) {
9898
jsonBytesKey, _ := json.Marshal(key)
9999

100100
val := dummyValue{"pop", 60}
101-
jsonBytesValue, err := json.Marshal(val)
102-
assert.Nil(t, err)
101+
jsonBytesValue, _ := json.Marshal(val)
102+
103103
expected := dummyIncludeKey{"pop", 60, dummyKey{"marco"}}
104104

105105
record, err := d.JsonMessageToRecord(context.Background(), &sarama.ConsumerMessage{

0 commit comments

Comments
 (0)