MCPcopy
hub / github.com/IBM/sarama / assertMessageKey

Function assertMessageKey

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

Source from the content-addressed store, hash-verified

2054}
2055
2056func assertMessageKey(t *testing.T, msg *ConsumerMessage, expectedKey Encoder) {
2057 t.Helper()
2058
2059 wantKey, _ := expectedKey.Encode()
2060 if !bytes.Equal(msg.Key, wantKey) {
2061 t.Fatalf("Incorrect key for message. expected=%s, actual=%s", expectedKey, msg.Key)
2062 }
2063}
2064
2065func assertMessageValue(t *testing.T, msg *ConsumerMessage, expectedValue Encoder) {
2066 t.Helper()

Callers 1

Calls 3

HelperMethod · 0.80
FatalfMethod · 0.80
EncodeMethod · 0.65

Tested by

no test coverage detected