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

Function testRequestWithoutByteComparison

request_test.go:610–616  ·  view source on GitHub ↗
(t *testing.T, name string, rb protocolBody)

Source from the content-addressed store, hash-verified

608}
609
610func testRequestWithoutByteComparison(t *testing.T, name string, rb protocolBody) {
611 if !rb.requiredVersion().IsAtLeast(MinVersion) {
612 t.Errorf("Request %s has invalid required version", name)
613 }
614 packet := testRequestEncode(t, name, rb, nil)
615 testRequestDecode(t, name, rb, packet)
616}
617
618func testRequestEncode(t *testing.T, name string, rb protocolBody, expected []byte) []byte {
619 req := &request{correlationID: 123, clientID: "foo", body: rb}

Calls 5

testRequestEncodeFunction · 0.85
testRequestDecodeFunction · 0.85
IsAtLeastMethod · 0.80
requiredVersionMethod · 0.65
ErrorfMethod · 0.65

Tested by

no test coverage detected