-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
enhance ut for server #882
Conversation
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.
LGTM! Just don't add the \n
in t.Fatalf()
calls..
server/util_test.go
Outdated
|
||
n = []byte("12345invalid678") | ||
if pn := parseSize(n); pn != -1 { | ||
t.Fatalf("Should error on %q, res=%d\n", n, pn) |
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.
You don't need the \n
at the end. Same for the other that you added. I know that it is in the existing test code but we try not to add them in new code.
server/util_test.go
Outdated
|
||
n = []byte("12345invalid678") | ||
if pn := parseInt64(n); pn != -1 { | ||
t.Fatalf("Should error on %q, res=%d\n", n, pn) |
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.
Remove \n on t.Fatalf and we should be good.
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.
RemoVe new lines on t.Fatalf calls. Otherwise LGTM.
@derekcollison Done. PTAL. |
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.
LGTM, thanks!
Changes proposed in this pull request:
TestParseSize
andTestParseSInt64
/cc @nats-io/core