mirror of
https://github.com/nodejs/node.git
synced 2024-11-21 10:59:27 +00:00
5ca2ab1ff5
test-domain-dep0097.js was sporadically failing because it is a parallel test and uses opens a default inspector port. This commit changes to bind to a random free port PR-URL: https://github.com/nodejs/node/pull/43199 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Minwoo Jung <nodecorelab@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de> Reviewed-By: Akhil Marsonya <akhil.marsonya27@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
18 lines
428 B
JavaScript
18 lines
428 B
JavaScript
'use strict';
|
|
const common = require('../common');
|
|
|
|
common.skipIfInspectorDisabled();
|
|
|
|
const assert = require('assert');
|
|
const domain = require('domain');
|
|
const inspector = require('inspector');
|
|
|
|
process.on('warning', common.mustCall((warning) => {
|
|
assert.strictEqual(warning.code, 'DEP0097');
|
|
assert.match(warning.message, /Triggered by calling emit on process/);
|
|
}));
|
|
|
|
domain.create().run(() => {
|
|
inspector.open(0);
|
|
});
|