Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Handle ports > 32k in Zipkin JSON #488

Merged
merged 2 commits into from
Oct 23, 2017
Merged

Handle ports > 32k in Zipkin JSON #488

merged 2 commits into from
Oct 23, 2017

Conversation

yurishkuro
Copy link
Member

Resolves #467

@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling 5e4d4f8 on fix-467 into c32f960 on master.

@yurishkuro yurishkuro changed the title Handle ports < 32k in Zipkin JSON Handle ports > 32k in Zipkin JSON Oct 23, 2017
deadline := time.Now().Add(2 * time.Second)
for {
if time.Now().After(deadline) {
t.Error("never received a span")
return
}
if want, have := 1, len(handler.zipkinSpansHandler.(*mockZipkinHandler).getSpans()); want != have {
if want, have := expecting, len(handler.getSpans()); want != have {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is "want" necessary? just do

if have := ....; expected != have {

@@ -147,10 +147,15 @@ func endpointToThrift(e endpoint) (*zipkincore.Endpoint, error) {
if err != nil {
return nil, err
}
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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2^15 and 2^16-1?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's the question?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh, yeah

Signed-off-by: Yuri Shkuro <[email protected]>
@ghost ghost assigned yurishkuro Oct 23, 2017
@ghost ghost added the review label Oct 23, 2017
@coveralls
Copy link

Coverage Status

Coverage remained the same at 100.0% when pulling cd5ea64 on fix-467 into c32f960 on master.

@yurishkuro yurishkuro merged commit a7f203b into master Oct 23, 2017
@ghost ghost removed the review label Oct 23, 2017
@yurishkuro yurishkuro deleted the fix-467 branch October 23, 2017 19:41
isaachier pushed a commit to isaachier/jaeger that referenced this pull request Nov 1, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants