Skip to content

Commit 9cfa52a

Browse files
danbevaddaleax
authored andcommitted
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. PR-URL: #14074 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Refael Ackermann <[email protected]>
1 parent 9e6a4d6 commit 9cfa52a

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

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

+9-2
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,15 @@ const common = require('../common');
1011
//
1112
// Refs: https://github.com/nodejs/node/issues/13343
1213

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

15-
const assert = require('assert');
1623
const cluster = require('cluster');
1724
const net = require('net');
1825

0 commit comments

Comments
 (0)