-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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: rearrange inspector headers into convention #13428
Conversation
@@ -17,14 +18,14 @@ if (cluster.isMaster) { | |||
})); | |||
worker.send('debugPort'); | |||
} | |||
process.on('exit', () => { | |||
process.on('exit', 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.
IIUC, common.mustCall()
on an exit handler won't do anything because the check for execution in mustCall()
is itself dependent on the exit
event. Any situation that would skip calling the function will also skip the check that the function has been called. If the event does not fire, then the check never happens. Unless I'm mistaken about all this, I'd say common.mustCall()
should be removed because it provides a false guarantee that the function will be called.
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 think this is true iff event handlers are called in the order they were registered. So the the one checking all the mustCall
s would run before this one, and IIUC it would fail since this instance didn't run yet.
Anyway test-inspector-port-zero-cluster.js
is a PITA, re: #13373
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.
Ohh @sam-github we need you input in #13373
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.
LGTM % the mustCall thing
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.
Needs one common.mustCall()
removed.
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.
No real opinion on the whitespace changes. The process.on('exit', common.mustCall())
change should be backed out I think. +1 to the changes in test/parallel/test-inspector-invalid-args.js
CI: https://ci.nodejs.org/job/node-test-commit/10341/ |
|
mustCall() removed, clearing my request for changes
This is now a whitespace-only change. Do we truly want to enforce blank lines after If so, we should add a lint rule (in a separate PR--not asking for a change to this one). If not, we probably don't need to land this. |
@@ -1,11 +1,12 @@ | |||
'use strict'; | |||
const common = require('../common'); |
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.
@Trott this is not whitespace only. I can remove all the other whitespace only changes if you'd like, I think they are more readable, and I think they are implied by the test guide, but this change, specifically, brings this test into conformance with the guide.
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.
Oh, yes, missed that one, sorry. Anyway, yeah, it's all fine. No objections.
Test guide describes a conventional layout for test headers, review inspector tests and reorganize to follow the convention. PR-URL: nodejs#13428 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
da1602e
to
aae0d45
Compare
Test guide describes a conventional layout for test headers, review inspector tests and reorganize to follow the convention. PR-URL: #13428 Reviewed-By: Refael Ackermann <refack@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Test guide describes a conventional layout for test headers, review
inspector tests and reorganize to follow the convention.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test,inspector