This repository has been archived by the owner on Jul 1, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 232
Reduce visibility of TextMapCodec.contextFromString to package scope #519
Merged
yurishkuro
merged 8 commits into
jaegertracing:master
from
isaachier:refactor-context-from-string
Aug 20, 2018
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
3ad52db
Reduce visibility of TextMapCodec.contextFromString to package scope
a1cb911
Get rid of JaegerSpanContextTest
843c937
Remove outdated comment
8847020
Change contextAsString to package scope
fa973ea
Style fixes
986986e
Move contextAsString to public method of TextMapCodec
48112ed
Specify expected string output with string formatting
900524b
Use fixed IDs to avoid string formatting
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
66 changes: 0 additions & 66 deletions
66
jaeger-core/src/test/java/io/jaegertracing/internal/JaegerSpanContextTest.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
removing it is not equivalent. But you can change L215 to use TextMapCodec's extract method.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure if this still applies. See testSpanToString in
TextMapCodec
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's what I am thinking. The method is called
testSpanToString
. Such method should belong in SpanTest class, not the codecs. But it's not actually testingspan.toString()
, onlyspanContext.contextAsString()
. So let's separate these.span.toString()
, we can simply compare with an exact literal string (including the operation name).contextAsString()
? Do we, strictly speaking, care if the output matches the output of the codec? What if we use a different codec in the future? I think it mattered more when span context had the oppositefromString()
method, but nowcontextAsString()
seems merely a dependency ofspan.toString()
, nothing more. Or is it used elsewhere? If not, we can not test it at all (since it's covered byspan.toString()
test), and we can consider making it package viz.Counter-proposal: keep the test here (since it's testing Span's behavior, not the codec), butThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But what? :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry, a left over