Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

tests: add test for cluster.worker.destroy(). #8307

Closed
wants to merge 1 commit into from

Conversation

misterdjules
Copy link

Add a simple test to cover workers' implementation of
Worker.prototype.destroy(). Before adding this test, this code wouldn't
be covered by the tests suite, and any regression introduced in workers'
implementation of Worker.prototype.destroy wouldn't be caught.

Fixes #8223.


process.on('exit', function() {
assert.equal(workerExited, 2,
"When master exits, all workers should have exited too");
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency, could you use single quotes in both of these asserts.

Add a simple test to cover workers' implementation of
Worker.prototype.destroy(). Before adding this test, this code wouldn't
be covered by the tests suite, and any regression introduced in workers'
implementation of Worker.prototype.destroy wouldn't be caught.

Fixes nodejs#8223.
@misterdjules
Copy link
Author

@cjihrig Thanks, updated!

@misterdjules
Copy link
Author

ping @tjfontaine @indutny @trevnorris

@trevnorris
Copy link

Thanks. Slight modifications and landed in 9c992bd.

@trevnorris trevnorris closed this Sep 18, 2014
@misterdjules
Copy link
Author

@trevnorris Thank you!

@trevnorris
Copy link

np. and thank you for the additional test.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants