GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||
GeezerVison is showing github.com — test: Refactor test-http2-compat-serverresponse-finished.js by antsmartian · Pull Request #21929 · nodejs/node Conversation
|
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I see this kind of change being done frequently recently and I think this is not always a good idea. If there are other tests that cover the real value then it's ok, if not we are hiding the real type by coercing to a boolean.
What I mean is that if a regression is introduced where response.socket is set to null (or any other falsy value) instead of undefined, with this change, we will not notice.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@lpinca I got your point. I even thought about it before I did the changes, but in this context, when the response is finished, its gonna be undefined. So socket and connection are no more valid, I felt it was fine to use ok. But yeah, if some other logic expects the socket to be undefined and we pass null, we gonna cause a regression. Good point.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
e9106e1 to
96a8979
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I agree with lpinca's point about the assert.ok though.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please change the assert.ok() calls back. I think it's fine for language-level APIs, but we should be more strict with the APIs we provide for the reasons previously noted.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
ping @antsmartian |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
@maclover7 Oops, sorry. Will update the PR in an hour or so. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
@maclover7 Ping :) |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Landed in f2518c4 |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
PR-URL: #21929 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: #21929 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#21929 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#21929 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
Backport-PR-URL: #22850 PR-URL: #21929 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Jon Moss <[email protected]> Reviewed-By: Trivikram Kamat <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.