Skip to content

Commit 8912f30

Browse files
galpeteryichoi
authored andcommitted
Fix the test-net-bind-twice.js test (#965)
On OSX the EADDRINUSE have a different value. IoT.js-DCO-1.0-Signed-off-by: Peter Gal [email protected]
1 parent 3d09ddc commit 8912f30

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/node/parallel/test-net-bind-twice.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,12 @@ server1.listen(0, '127.0.0.1', common.mustCall(function() {
4646
var server2 = net.createServer(common.fail);
4747

4848
server2.on('error', common.mustCall(function(e) {
49-
assert.strictEqual(e, -98); // EADDRINUSE
49+
// EADDRINUSE have different value on OSX.
50+
if (common.isOSX) {
51+
assert.strictEqual(e, -48);
52+
} else {
53+
assert.strictEqual(e, -98);
54+
}
5055

5156
server1.close();
5257
}));

0 commit comments

Comments
 (0)