Skip to content

Commit 2d0d934

Browse files
committed
test: check and fail inspector-cluster-port-clash
Currently this test fail when configured --without-inspector or --without-ssl as it is expected to fail but the skipIfInspectorDisabled check will exit as if the test was sucessful. This commit checks if inspector support is available and fails the test allowing the test to be skipped.
1 parent 15599cb commit 2d0d934

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

test/known_issues/test-inspector-cluster-port-clash.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// Flags: --inspect=0
22
'use strict';
33
const common = require('../common');
4+
const assert = require('assert');
45

56
// With the current behavior of Node.js (at least as late as 8.1.0), this
67
// test fails with the following error:
@@ -10,9 +11,13 @@ const common = require('../common');
1011
//
1112
// Refs: https://github.com/nodejs/node/issues/13343
1213

13-
common.skipIfInspectorDisabled();
14+
if (process.config.variables.v8_enable_inspector === 0) {
15+
// When the V8 inspector is disabled, using either --without-inspector or
16+
// --without-ssl, this test will not fail which it is expected to do.
17+
// The following fail will allow this test to be skipped by failing it.
18+
assert.fail('skipping as V8 inspector is disabled');
19+
}
1420

15-
const assert = require('assert');
1621
const cluster = require('cluster');
1722
const net = require('net');
1823

0 commit comments

Comments
 (0)