| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Wrap the callbacks which make assertions in common.mustcall() to ensure they are called
There was a problem hiding this comment.
LGTM if CI is green. Would prefer to not add the two new console.log() statements if there isn't a super-compelling reason to do so.
Sorry, something went wrong.
| request1.socket.destroy(); | ||
|
|
||
| response.once('close', function() { | ||
| console.log('called'); |
There was a problem hiding this comment.
Nit: remove debugging addition?
Sorry, something went wrong.
| process.nextTick(common.mustCall(function() { | ||
| // assert that the same socket was not assigned to request2, | ||
| // since it was destroyed. | ||
| console.log('called 2'); |
There was a problem hiding this comment.
Nit: remove this one too?
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM, but it looks like one more could be added on line 47 (response.once('close').
Sorry, something went wrong.
@cjihrig That callback does not execute at all when I run the test. (Should it? If so, I think there's a bug.) Perhaps it is there to either handle a race condition or else is platform-dependent? The big comment a few lines above it seems relevant. |
Sorry, something went wrong.
|
Yea, that comment does seem relevant. It should be fine to leave line 47 alone since it might not execute. It seems less than ideal to have cases like that in our tests, but that has nothing to do with this PR. |
Sorry, something went wrong.
Sorry, something went wrong.
* wrap callbacks in mustCall() * Wrap the callbacks which make assertions in common.mustcall() to ensure they are called PR-URL: #11201 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* wrap callbacks in mustCall() * Wrap the callbacks which make assertions in common.mustcall() to ensure they are called PR-URL: #11201 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* wrap callbacks in mustCall() * Wrap the callbacks which make assertions in common.mustcall() to ensure they are called PR-URL: nodejs#11201 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
* wrap callbacks in mustCall() * Wrap the callbacks which make assertions in common.mustcall() to ensure they are called PR-URL: nodejs#11201 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
|
needs a backport PR to land in v6 or v4 |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Wrap the callbacks which make assertions in common.mustcall() to ensure they are called
Checklist
Affected core subsystem(s)
Tests for http