test: fix assert.throws error in test-http-parser#19626
Closed
Trott wants to merge 1 commit intonodejs:masterfrom
Closed
test: fix assert.throws error in test-http-parser#19626Trott wants to merge 1 commit intonodejs:masterfrom
Trott wants to merge 1 commit intonodejs:masterfrom
Conversation
The third argument of `assert.throws()` is a message that is used by the AssertionError, not the message to check in the thrown error. It appears that there is an assert.throws() in test-http-parser that expects the latter behavior. Rewrite the call to check the error message. Even if this wasn't a mistake, this change results in a more robust check.
Member
Author
danbev
approved these changes
Mar 27, 2018
richardlau
approved these changes
Mar 27, 2018
Member
Author
|
Failure on CI appears to be the "mysterious crash with no stack trace" we've been seeing from time to time. @BridgeAR https://ci.nodejs.org/job/node-test-commit-linux/17375/nodes=debian8-x86/console 00:33:11 not ok 924 parallel/test-http2-compat-socket
00:33:11 ---
00:33:11 duration_ms: 0.508
00:33:11 severity: fail
00:33:11 stack: |-
00:33:11 (node:15382) ExperimentalWarning: The http2 module is an experimental API.
00:33:11 ...In any event, should be unrelated to this PR. Re-running node-test-commit-linux: https://ci.nodejs.org/job/node-test-commit-linux/17376/ |
cjihrig
approved these changes
Mar 27, 2018
lpinca
approved these changes
Mar 27, 2018
Member
|
@Trott thanks for pointing that out. I am going to try to get back to that problem again. |
trivikr
approved these changes
Mar 27, 2018
Member
Author
|
(CI re-run was green.) |
jasnell
approved these changes
Mar 28, 2018
Trott
added a commit
to Trott/io.js
that referenced
this pull request
Mar 29, 2018
The third argument of `assert.throws()` is a message that is used by the AssertionError, not the message to check in the thrown error. It appears that there is an assert.throws() in test-http-parser that expects the latter behavior. Rewrite the call to check the error message. Even if this wasn't a mistake, this change results in a more robust check. PR-URL: nodejs#19626 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Member
Author
|
Landed in 42d1d72 |
targos
pushed a commit
that referenced
this pull request
Apr 2, 2018
The third argument of `assert.throws()` is a message that is used by the AssertionError, not the message to check in the thrown error. It appears that there is an assert.throws() in test-http-parser that expects the latter behavior. Rewrite the call to check the error message. Even if this wasn't a mistake, this change results in a more robust check. PR-URL: #19626 Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Merged
This file contains hidden or 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
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.
The third argument of
assert.throws()is a message that is used by theAssertionError, not the message to check in the thrown error. It appears
that there is an assert.throws() in test-http-parser that expects the
latter behavior. Rewrite the call to check the error message. Even if
this wasn't a mistake, this change results in a more robust check.
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes