Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
test: remove unneeded listeners
Unhandled `'error'` events will make the process exit with an unclean
exit code anyway.
  • Loading branch information
lpinca committed Oct 21, 2024
commit fce17554d183beef28fca5c80a6129709ad110ba
2 changes: 1 addition & 1 deletion test/parallel/test-child-process-dgram-reuseport.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ const socket = dgram.createSocket(options);

socket.bind(+process.env.port, common.mustCall(() => {
socket.close();
})).on('error', common.mustNotCall());
}));
2 changes: 1 addition & 1 deletion test/parallel/test-child-process-net-reuseport.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ const server = net.createServer();

server.listen({ ...options, port: +process.env.port }, common.mustCall(() => {
server.close();
})).on('error', common.mustNotCall());
}));
4 changes: 2 additions & 2 deletions test/parallel/test-cluster-dgram-reuseport.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,5 +35,5 @@ socket1.bind(0, () => {
socket2.bind(socket1.address().port, () => {
socket1.close(close);
socket2.close(close);
}).on('error', common.mustNotCall());
}).on('error', common.mustNotCall());
});
});
3 changes: 0 additions & 3 deletions test/parallel/test-cluster-net-reuseport.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,3 @@ server1.listen(options, common.mustCall(() => {
server2.close(close);
}));
}));

server1.on('error', common.mustNotCall());
server2.on('error', common.mustNotCall());
2 changes: 0 additions & 2 deletions test/parallel/test-dgram-reuseport.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@ function test() {
socket2.close();
}));
}));
socket1.on('error', common.mustNotCall());
socket2.on('error', common.mustNotCall());
}

checkSupportReusePort().then(test, () => {
Expand Down
2 changes: 0 additions & 2 deletions test/parallel/test-net-reuseport.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ function test(host) {
server2.close();
}));
}));
server1.on('error', common.mustNotCall());
server2.on('error', common.mustNotCall());
}

checkSupportReusePort()
Expand Down