-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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 : refactor parallel/test-tls-async-cb-after-socket-end #18985
test : refactor parallel/test-tls-async-cb-after-socket-end #18985
Conversation
const options = { | ||
secureOptions: SSL_OP_NO_TICKET, | ||
key: fixtures.readSync('test_key.pem'), | ||
cert: fixtures.readSync('test_cert.pem') | ||
}; | ||
|
||
const server = tls.createServer(options, function(c) { | ||
}); | ||
const server = tls.createServer(options, common.mustCall((c) => { |
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.
Since the callback is empty it can be omitted from common.mustCall()
.
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.
fixed
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.
I meant that this could be just common.mustCall()
.
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.
sorry wrong interpreted
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.
change made :)
const options = { | ||
secureOptions: SSL_OP_NO_TICKET, | ||
key: fixtures.readSync('test_key.pem'), | ||
cert: fixtures.readSync('test_cert.pem') | ||
}; | ||
|
||
const server = tls.createServer(options, function(c) { | ||
const server = tls.createServer(options, (c) => { | ||
}); |
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.
Just so it is not overlooked: #18985 (comment)
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.
fixing it
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.
fixed :) Thanks for pointing out
|
||
function next() { | ||
if (!client || !sessionCb) | ||
return; | ||
|
||
|
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: it would be great to remove this line again.
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.
fixed :)
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.
Code looks good. Kindly consider squashing this into one commit (https://github.com/nodejs/node/blob/master/doc/guides/contributing/pull-requests.md#commit-squashing)
LGTM with @davisokoth 's comment about squashing. |
c4ce57a
to
855826f
Compare
change made :) |
CI is failing for |
node-test-commit-linux was rerun, failed again for |
Landed in d1156da |
PR-URL: nodejs#18985 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
PR-URL: #18985 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
this replaces the function with arrow function, callback by common.mustCall
and added the description
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test