Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f6356fe

Browse filesBrowse files
Trotttargos
authored andcommitted
test: use callback arguments in getconnections test
Use previously-unused callback arguments in test-child-process-fork-getconnections. PR-URL: #30775 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
1 parent 4cb8476 commit f6356fe
Copy full SHA for f6356fe

File tree

Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-2
lines changed
Open diff view settings
Collapse file

‎test/parallel/test-child-process-fork-getconnections.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-fork-getconnections.js
+6-2Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ if (process.argv[2] === 'child') {
5858
const child = fork(process.argv[1], ['child']);
5959

6060
child.on('exit', function(code, signal) {
61-
if (!subprocessKilled)
62-
throw new Error('subprocess died unexpectedly!');
61+
if (!subprocessKilled) {
62+
assert.fail('subprocess died unexpectedly! ' +
63+
`code: ${code} signal: ${signal}`);
64+
}
6365
});
6466

6567
const server = net.createServer();
@@ -98,6 +100,8 @@ if (process.argv[2] === 'child') {
98100
child.once('message', function(m) {
99101
assert.strictEqual(m.status, 'closed');
100102
server.getConnections(function(err, num) {
103+
assert.ifError(err);
104+
assert.strictEqual(num, count - (i + 1));
101105
closeSockets(i + 1);
102106
});
103107
});

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.