Skip to content

Commit f6356fe

Browse 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

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,10 @@ if (process.argv[2] === 'child') {
5858
constchild=fork(process.argv[1],['child']);
5959

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

6567
constserver=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)