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

Function assertMessageKey

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

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 3

HelperMethod · 0.80
FatalfMethod · 0.80
EncodeMethod · 0.65

Tested by

no test coverage detected