-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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: add test-cluster-worker-deprecated #10675
Conversation
Add test to cover setter for deprecated cluster Worker property. Previously, the setter was not being exercised in tests.
@@ -31,14 +31,12 @@ function Worker(options) { | |||
this.exitedAfterDisconnect = undefined; | |||
|
|||
Object.defineProperty(this, 'suicide', { | |||
get: internalUtil.deprecate(() => { |
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 would describe this as cluster: better suicide deprecation message
(or something of the like), since its a change to improve the deprecation message, along with a unit test for that change.
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.
@sam-github The deprecation message is not being changed here.
The new test exercises the getter and setter. They were not being exercised. The code change to cluster.js
refactor the getter/setter for clarity (good-bye, string concatenation), but do not change the behavior.
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.
OK, I missed that, the diff is hard to read. Shouldn't a change to lib/cluster.js have cluster:
in its commit message? Even if its just a stylistic change?
Add test to cover setter for deprecated cluster Worker property. Previously, the setter was not being exercised in tests. PR-URL: nodejs#10675 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Landed in 3f61521 |
Add test to cover setter for deprecated cluster Worker property. Previously, the setter was not being exercised in tests. PR-URL: nodejs#10675 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Add test to cover setter for deprecated cluster Worker property. Previously, the setter was not being exercised in tests. PR-URL: nodejs#10675 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Add test to cover setter for deprecated cluster Worker property. Previously, the setter was not being exercised in tests. PR-URL: nodejs#10675 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
Add test to cover setter for deprecated cluster Worker property. Previously, the setter was not being exercised in tests. PR-URL: nodejs#10675 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Sam Roberts <vieuxtech@gmail.com>
This does not land cleanly in LTS. Added dont-land label. Please feel free to manually backport |
Add test to cover setter for deprecated cluster Worker property.
Previously, the setter was not being exercised in tests.
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesAffected core subsystem(s)
test cluster