Skip to content

Commit

Permalink
test: add fix so that test exits if port 42 is unprivileged
Browse files Browse the repository at this point in the history
  • Loading branch information
7suyash7 committed Dec 16, 2022
1 parent 11d4d4a commit 83b02d8
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions test/parallel/test-cluster-bind-privileged-port.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,8 @@ if (cluster.isPrimary) {
const s = net.createServer(common.mustNotCall());
s.listen(42, (err) => {
if (err && err.code === 'EACCES') {
// Port is unprivileged, exit successfully
process.disconnect();
} else {
// Port is privileged, or an unexpected error occurred
process.exit(0);
}
});
Expand Down

0 comments on commit 83b02d8

Please sign in to comment.