Skip to content

Commit

Permalink
test: check and fail inspector-cluster-port-clash
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
danbev committed Jul 5, 2017
1 parent 15599cb commit 2d0d934
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions test/known_issues/test-inspector-cluster-port-clash.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// Flags: --inspect=0
'use strict';
const common = require('../common');
const assert = require('assert');

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

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

const assert = require('assert');
const cluster = require('cluster');
const net = require('net');

Expand Down

0 comments on commit 2d0d934

Please sign in to comment.