Skip to content
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

Closed
wants to merge 1 commit into from
Closed

Conversation

Trott
Copy link
Member

@Trott Trott commented Jan 7, 2017

Add test to cover setter for deprecated cluster Worker property.
Previously, the setter was not being exercised in tests.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • commit message follows commit guidelines
Affected core subsystem(s)

test cluster

Add test to cover setter for deprecated cluster Worker property.
Previously, the setter was not being exercised in tests.
@Trott Trott added cluster Issues and PRs related to the cluster subsystem. test Issues and PRs related to the tests. labels Jan 7, 2017
@nodejs-github-bot nodejs-github-bot added the cluster Issues and PRs related to the cluster subsystem. label Jan 7, 2017
@mscdex
Copy link
Contributor

mscdex commented Jan 7, 2017

@@ -31,14 +31,12 @@ function Worker(options) {
this.exitedAfterDisconnect = undefined;

Object.defineProperty(this, 'suicide', {
get: internalUtil.deprecate(() => {
Copy link
Contributor

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.

Copy link
Member Author

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.

Copy link
Contributor

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?

Trott added a commit to Trott/io.js that referenced this pull request Jan 10, 2017
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 <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
@Trott
Copy link
Member Author

Trott commented Jan 10, 2017

Landed in 3f61521

@Trott Trott closed this Jan 10, 2017
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 18, 2017
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 <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 23, 2017
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 <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 25, 2017
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 <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
italoacasas pushed a commit to italoacasas/node that referenced this pull request Jan 27, 2017
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 <[email protected]>
Reviewed-By: Sam Roberts <[email protected]>
@italoacasas italoacasas mentioned this pull request Jan 29, 2017
@MylesBorins
Copy link
Contributor

This does not land cleanly in LTS. Added dont-land label. Please feel free to manually backport

@Trott Trott deleted the deprecated branch January 13, 2022 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cluster Issues and PRs related to the cluster subsystem. test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants