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

Function assertMessageKey

consumer_test.go:2153–2160  ·  view source on GitHub ↗
(t *testing.T, msg *ConsumerMessage, expectedKey Encoder)

Source from the content-addressed store, hash-verified

2151}
2152
2153func assertMessageKey(t *testing.T, msg *ConsumerMessage, expectedKey Encoder) {
2154 t.Helper()
2155
2156 wantKey, _ := expectedKey.Encode()
2157 if !bytes.Equal(msg.Key, wantKey) {
2158 t.Fatalf("Incorrect key for message. expected=%s, actual=%s", expectedKey, msg.Key)
2159 }
2160}
2161
2162func assertMessageValue(t *testing.T, msg *ConsumerMessage, expectedValue Encoder) {
2163 t.Helper()

Callers 1

Calls 3

HelperMethod · 0.80
FatalfMethod · 0.80
EncodeMethod · 0.65

Tested by

no test coverage detected