diff --git a/internal/kafka_executable/kafka_executable.go b/internal/kafka_executable/kafka_executable.go index e6c4c01..f871090 100644 --- a/internal/kafka_executable/kafka_executable.go +++ b/internal/kafka_executable/kafka_executable.go @@ -29,7 +29,7 @@ func NewKafkaExecutable(stageHarness *test_case_harness.TestCaseHarness) *KafkaE func (b *KafkaExecutable) Run(args ...string) error { b.args = args - if b.args == nil || len(b.args) == 0 { + if len(b.args) == 0 { b.logger.Infof("$ ./%s", path.Base(b.executable.Path)) } else { var log string diff --git a/protocol/api/api_versions.go b/protocol/api/api_versions.go index 5ce5a10..558a5c2 100644 --- a/protocol/api/api_versions.go +++ b/protocol/api/api_versions.go @@ -52,6 +52,7 @@ func DecodeApiVersionsHeader(response []byte, version int16) (*ResponseHeader, e return &responseHeader, nil } +// DecodeApiVersionsHeaderAndResponse decodes the header and response // If an error is encountered while decoding, the returned objects are nil func DecodeApiVersionsHeaderAndResponse(response []byte, version int16) (*ResponseHeader, *ApiVersionsResponse, error) { decoder := decoder.RealDecoder{} diff --git a/protocol/broker.go b/protocol/broker.go index b18527b..d19ada2 100644 --- a/protocol/broker.go +++ b/protocol/broker.go @@ -68,10 +68,10 @@ func (b *Broker) ConnectWithRetries(executable *kafka_executable.KafkaExecutable } // Don't print errors in the first second - if retries > 2 { - // ToDo: fixtures fail - // logger.Infof("Failed to connect to broker at %s, retrying in 1s", b.addr) - } + // ToDo: fixtures fail + // if retries > 2 { + // logger.Infof("Failed to connect to broker at %s, retrying in 1s", b.addr) + // } retries += 1 time.Sleep(1000 * time.Millisecond) diff --git a/protocol/encoder/real_encoder.go b/protocol/encoder/real_encoder.go index 47d011a..6544e77 100644 --- a/protocol/encoder/real_encoder.go +++ b/protocol/encoder/real_encoder.go @@ -108,6 +108,7 @@ func (re *RealEncoder) PutCompactString(in string) { func (re *RealEncoder) PutNullableCompactString(in *string) { if in == nil { re.PutInt8(0) + return } re.PutCompactString(*in) }