Skip to content

test: add inspect-brk option to cluster module - #12503

Closed
dave-k wants to merge 4 commits into
nodejs:masterfrom
dave-k:1140_test_cluster_inspect-brk
Closed

test: add inspect-brk option to cluster module#12503
dave-k wants to merge 4 commits into
nodejs:masterfrom
dave-k:1140_test_cluster_inspect-brk

Conversation

@dave-k

Copy link
Copy Markdown
Contributor

Ensure that cluster interoperates with the --inspect-brk option.
This does not test for —debug-brk.

Fixes: #11420

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test cluster

Ensure that cluster interoperates with the --inspect-brk option.
This does not test for —debug-brk.
Fixes: nodejs#11420
@nodejs-github-botnodejs-github-bot added the test Issues and PRs related to the tests. label Apr 19, 2017
@hiroppyhiroppy added the cluster Issues and PRs related to the cluster subsystem. label Apr 19, 2017

@benjamingrbenjamingr left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Slightly confusing way to write this - but still LGTM.

@cjihrig

Copy link
Copy Markdown
Contributor

It might be helpful to have the cluster worker print something or crash. Then, you can test that it doesn't happen because the worker is at a breakpoint.

Have the cluster worker print something or crash.
Then, test that it doesn't happen
because the worker is at a breakpoint.
test([`--inspect-brk=${debuggerPort}`]);
} else {
// Cluster worker is at a breakpoint, should not reach here.
assert.fail(1, 2, 'Test failed: cluster worker is at a breakpoint.', '>');

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As of recently, this can just be:

assert.fail('Test failed: cluster worker is at a breakpoint.');

@dave-k

Copy link
Copy Markdown
ContributorAuthor

Are the requested changes OK?

@cjihrigcjihrig left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM if the CI is good. However, because this test uses common.PORT, it should probably be moved from parallel to sequential.

@dave-k

Copy link
Copy Markdown
ContributorAuthor

Can this proceed or does the test need to be moved from parallel to sequential?

@cjihrig

Copy link
Copy Markdown
Contributor

I would move it to sequential as long as common.PORT is there.

because this test uses common.PORT, moved from parallel to sequential.
@cjihrig

Copy link
Copy Markdown
Contributor

@addaleax

Copy link
Copy Markdown
Member

Landed in 0324ac6

addaleax pushed a commit that referenced this pull request Apr 29, 2017
Ensure that cluster interoperates with the --inspect-brk option.
This does not test for --debug-brk.
Fixes: #11420
PR-URL: #12503
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@jasnelljasnell mentioned this pull request May 11, 2017
@gibfahngibfahn mentioned this pull request Jun 15, 2017
3 tasks
@gibfahn

Copy link
Copy Markdown
Member

Should land with #12615 if that lands

@gibfahngibfahn mentioned this pull request Jun 18, 2017
3 tasks
MylesBorins pushed a commit that referenced this pull request Oct 16, 2017
Ensure that cluster interoperates with the --inspect-brk option.
This does not test for --debug-brk.
Fixes: #11420
PR-URL: #12503
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Oct 17, 2017
MylesBorins pushed a commit that referenced this pull request Oct 25, 2017
Ensure that cluster interoperates with the --inspect-brk option.
This does not test for --debug-brk.
Fixes: #11420
PR-URL: #12503
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorinsMylesBorins mentioned this pull request Nov 3, 2017
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

clusterIssues and PRs related to the cluster subsystem.testIssues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement a test to ensure that cluster properly interoperates with the --{inspect,debug}-brk options

8 participants

@dave-k@cjihrig@addaleax@gibfahn@benjamingr@MylesBorins@hiroppy@nodejs-github-bot