-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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: https server close event #5106
Conversation
The commit should target the |
d1d7854
to
094f507
Compare
|
||
function shutdown() { | ||
server.close(function() { | ||
serverCloseEventCalled = true; |
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: Instead of using the serverCloseEventCalled
boolean, use common.mustCall()
on the close
callback.
094f507
to
f183608
Compare
console.log('1..0 # Skipped: missing crypto'); | ||
return; | ||
} | ||
var https = require('https'); |
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.
const
here please
LGTM if CI is green. Few nits tho. |
@jasnell This is a test that needs a bugfix. It is intended to fail. It should not land until there is a bug fix (assuming this is a bug and not expected behavior being misconstrued as a bug, but it looks like a genuine bug to me). Technically, I guess this shouldn't be a pull request and should instead be put in #5083. But the folks reporting this have done such a great job tracking down everything relevant to their bug report that I'm not inclined to complain. Anyway, with that context, I guess we can look at the all-red CI as a win. (Well, except the lint warning which says that |
For a bug fix, restoring the server property on socket fixes this particular test. This can be done by removing lines (381 and 382) in if (socket && socket.server === this.server)
socket.server = null; However these two tests will not pass:
|
Also, yep the goal with opening as a PR is to have CI run and having the failing tests (so we can fix). We can put a WIP on this if that's necessary. |
a124228
to
2d3b2c0
Compare
Bug fix found, all tests passing locally. |
2d3b2c0
to
88e8dd4
Compare
CI looks good. (Just one known flaky test that should be fixed when #5154 lands.) LGTM but sign-off from someone who has spent some quality time with |
Sorry, just found this after proposing #5262 . Please let me know if you still want to pursue this PR's approach. |
I ran the test included in this PR with the fix in #5262 and everything passed, perhaps we should include this test also. |
@braydonf sounds like a good idea, may I ask you to strip all other changes from this PR then? |
5f289e3
to
630eb1a
Compare
Okay rebased with only the test included. Made a backup of the branch with other changes, for reference. |
CI is green except one unrelated failure. |
LGTM |
Landing. |
LGTM |
Landed in 210e65a, thank you! |
PR-URL: #5106 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: #5106 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
This test is failing in v4.x-staging 😭 |
@thealphanerd I think this test depends on 7885b1d so if that didn't land on v4.x-staging, that might explain it. |
7885b1d just landed and this is now landing cleanly. Thank you as always for your swift and accurate response |
PR-URL: #5106 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: #5106 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
PR-URL: #5106 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Fedor Indutny <fedor@indutny.com>
Closes: #5083