Skip to content

Commit 8e9089a

Browse files
committed
test: check for error on Windows
Instead of not running the dgram-bind-shared-ports on Windows, check that it gets ENOTSUP. PR-URL: #2035 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent c87c34c commit 8e9089a

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

test/parallel/test-dgram-bind-shared-ports.js

+10-5
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,21 @@ var assert = require('assert');
44
var cluster = require('cluster');
55
var dgram = require('dgram');
66

7-
// TODO XXX FIXME when windows supports clustered dgram ports re-enable this
8-
// test
9-
if (process.platform == 'win32')
10-
process.exit(0);
11-
127
function noop() {}
138

149
if (cluster.isMaster) {
1510
var worker1 = cluster.fork();
1611

12+
if (common.isWindows) {
13+
var checkErrType = function(er) {
14+
assert.equal(er.code, 'ENOTSUP');
15+
worker1.kill();
16+
};
17+
18+
worker1.on('error', common.mustCall(checkErrType, 1));
19+
return;
20+
}
21+
1722
worker1.on('message', function(msg) {
1823
assert.equal(msg, 'success');
1924
var worker2 = cluster.fork();

0 commit comments

Comments
 (0)