diff --git a/cmd/collector/app/zipkin/http_handler_test.go b/cmd/collector/app/zipkin/http_handler_test.go index 4bf48e43cec..8714791e10a 100644 --- a/cmd/collector/app/zipkin/http_handler_test.go +++ b/cmd/collector/app/zipkin/http_handler_test.go @@ -93,7 +93,7 @@ func waitForSpans(t *testing.T, handler *mockZipkinHandler, expecting int) { t.Error("never received a span") return } - if want, have := expecting, len(handler.getSpans()); want != have { + if have := len(handler.getSpans()); expecting != have { time.Sleep(time.Millisecond) continue } diff --git a/cmd/collector/app/zipkin/json.go b/cmd/collector/app/zipkin/json.go index e8572ce3c2b..e0d196d1ac0 100644 --- a/cmd/collector/app/zipkin/json.go +++ b/cmd/collector/app/zipkin/json.go @@ -149,7 +149,7 @@ func endpointToThrift(e endpoint) (*zipkincore.Endpoint, error) { } port := e.Port if port >= (1 << 15) { - // Zipkin.thrift defines port as i16, so values between (2^16 and 2^16-1) must be encoded as negative + // Zipkin.thrift defines port as i16, so values between (2^15 and 2^16-1) must be encoded as negative port = port - (1 << 16) }