mirror of
https://github.com/zebrajr/node.git
synced 2025-12-06 00:20:08 +01:00
test: skip failing tests for osx mojave
Refs: https://github.com/nodejs/node/issues/21679 PR-URL: https://github.com/nodejs/node/pull/23550 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: George Adams <george.adams@uk.ibm.com> Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Santiago Gimeno <santiago.gimeno@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
This commit is contained in:
parent
aba1ff202c
commit
9f15bc40b8
|
|
@ -47,7 +47,8 @@ exports.isSunOS = process.platform === 'sunos';
|
|||
exports.isFreeBSD = process.platform === 'freebsd';
|
||||
exports.isOpenBSD = process.platform === 'openbsd';
|
||||
exports.isLinux = process.platform === 'linux';
|
||||
exports.isOSX = process.platform === 'darwin';
|
||||
const isOSX = exports.isOSX = process.platform === 'darwin';
|
||||
exports.isOSXMojave = isOSX && (os.release().startsWith('18'));
|
||||
|
||||
exports.enoughTestMem = os.totalmem() > 0x70000000; /* 1.75 Gb */
|
||||
const cpus = os.cpus();
|
||||
|
|
|
|||
25
test/known_issues/test-cluster-bind-privileged-port.js
Normal file
25
test/known_issues/test-cluster-bind-privileged-port.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
'use strict';
|
||||
const common = require('../common');
|
||||
|
||||
// This test should fail on macOS (10.14) due to an issue with privileged ports.
|
||||
|
||||
const assert = require('assert');
|
||||
const cluster = require('cluster');
|
||||
const net = require('net');
|
||||
|
||||
if (!common.isOSXMojave)
|
||||
assert.fail('Code should fail only on macOS Mojave.');
|
||||
|
||||
|
||||
if (cluster.isMaster) {
|
||||
cluster.fork().on('exit', common.mustCall((exitCode) => {
|
||||
assert.strictEqual(exitCode, 0);
|
||||
}));
|
||||
} else {
|
||||
const s = net.createServer(common.mustNotCall());
|
||||
s.listen(42, common.mustNotCall('listen should have failed'));
|
||||
s.on('error', common.mustCall((err) => {
|
||||
assert.strictEqual(err.code, 'EACCES');
|
||||
process.disconnect();
|
||||
}));
|
||||
}
|
||||
|
|
@ -21,6 +21,11 @@
|
|||
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
|
||||
// Skip on OS X Mojave. https://github.com/nodejs/node/issues/21679
|
||||
if (common.isOSXMojave)
|
||||
common.skip('bypass test for Mojave due to OSX issue');
|
||||
|
||||
if (common.isWindows)
|
||||
common.skip('not reliable on Windows.');
|
||||
|
||||
|
|
|
|||
|
|
@ -21,6 +21,11 @@
|
|||
|
||||
'use strict';
|
||||
const common = require('../common');
|
||||
|
||||
// Skip on OS X Mojave. https://github.com/nodejs/node/issues/21679
|
||||
if (common.isOSXMojave)
|
||||
common.skip('bypass test for Mojave due to OSX issue');
|
||||
|
||||
if (common.isWindows)
|
||||
common.skip('not reliable on Windows');
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user