MCPcopy Create free account
hub / github.com/IBM/sarama / assertMessageValue

Function assertMessageValue

consumer_test.go:2066–2073  ·  view source on GitHub ↗
(t *testing.T, msg *ConsumerMessage, expectedValue Encoder)

Source from the content-addressed store, hash-verified

2064}
2065
2066func assertMessageValue(t *testing.T, msg *ConsumerMessage, expectedValue Encoder) {
2067 t.Helper()
2068
2069 wantValue, _ := expectedValue.Encode()
2070 if !bytes.Equal(msg.Value, wantValue) {
2071 t.Fatalf("Incorrect value for message. expected=%s, actual=%s", expectedValue, msg.Key)
2072 }
2073}
2074
2075func assertMessageOffset(t *testing.T, msg *ConsumerMessage, expectedOffset int64) {
2076 t.Helper()

Callers 1

Calls 3

HelperMethod · 0.80
FatalfMethod · 0.80
EncodeMethod · 0.65

Tested by

no test coverage detected