-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
test: add error checking in callback #11446
Closed
Closed
Conversation
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 assert.ifError() for test-dgram-send-callback-buffer-length.
Trott
added
dgram
Issues and PRs related to the dgram subsystem / UDP.
test
Issues and PRs related to the tests.
labels
Feb 17, 2017
jasnell
approved these changes
Feb 17, 2017
santigimeno
approved these changes
Feb 17, 2017
hiroppy
approved these changes
Feb 18, 2017
targos
approved these changes
Feb 18, 2017
cjihrig
approved these changes
Feb 18, 2017
lpinca
reviewed
Feb 19, 2017
@@ -11,6 +11,7 @@ const offset = 20; | |||
const len = buf.length - offset; | |||
|
|||
const messageSent = common.mustCall(function messageSent(err, bytes) { | |||
assert.ifError(err); | |||
assert.notStrictEqual(bytes, buf.length); |
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.
Nit: not related to this PR but I think this assertion is redundant. We can keep only the one on the next line.
lpinca
approved these changes
Feb 19, 2017
jasnell
pushed a commit
that referenced
this pull request
Feb 19, 2017
Add assert.ifError() for test-dgram-send-callback-buffer-length. PR-URL: #11446 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Landed in c090ca8 |
addaleax
pushed a commit
that referenced
this pull request
Feb 22, 2017
Add assert.ifError() for test-dgram-send-callback-buffer-length. PR-URL: #11446 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Merged
jasnell
pushed a commit
that referenced
this pull request
Mar 7, 2017
Add assert.ifError() for test-dgram-send-callback-buffer-length. PR-URL: #11446 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
A backport PR would be needed to land this in v4 |
MylesBorins
pushed a commit
that referenced
this pull request
Mar 9, 2017
Add assert.ifError() for test-dgram-send-callback-buffer-length. PR-URL: #11446 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Add assert.ifError() for test-dgram-send-callback-buffer-length.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test dgram