Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: use --port=0 in debugger tests that do not have to work on 9229 #44342

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-auto-resume.js
Expand Up @@ -20,7 +20,7 @@ addLibraryPath(process.env);
const env = { ...process.env };
env.NODE_INSPECT_RESUME_ON_START = '1';

const cli = startCLI([script], [], { env });
const cli = startCLI(['--port=0', script], [], { env });

cli.waitForInitialBreak()
.then(() => {
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-backtrace.js
Expand Up @@ -13,7 +13,7 @@ const path = require('path');
{
const scriptFullPath = fixtures.path('debugger', 'backtrace.js');
const script = path.relative(process.cwd(), scriptFullPath);
const cli = startCLI([script]);
const cli = startCLI(['--port=0', script]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-break.js
Expand Up @@ -13,7 +13,7 @@ const path = require('path');
{
const scriptFullPath = fixtures.path('debugger', 'break.js');
const script = path.relative(process.cwd(), scriptFullPath);
const cli = startCLI([script]);
const cli = startCLI(['--port=0', script]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-breakpoint-exists.js
Expand Up @@ -10,7 +10,7 @@ const startCLI = require('../common/debugger');
// Test for "Breakpoint at specified location already exists" error.
{
const script = fixtures.path('debugger', 'three-lines.js');
const cli = startCLI([script]);
const cli = startCLI(['--port=0', script]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-clear-breakpoints.js
Expand Up @@ -13,7 +13,7 @@ const path = require('path');
{
const scriptFullPath = fixtures.path('debugger', 'break.js');
const script = path.relative(process.cwd(), scriptFullPath);
const cli = startCLI([script]);
const cli = startCLI(['--port=0', script]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-exceptions.js
Expand Up @@ -13,7 +13,7 @@ const path = require('path');
{
const scriptFullPath = fixtures.path('debugger', 'exceptions.js');
const script = path.relative(process.cwd(), scriptFullPath);
const cli = startCLI([script]);
const cli = startCLI(['--port=0', script]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-exec-scope.js
Expand Up @@ -10,7 +10,7 @@ const assert = require('assert');

// exec .scope
{
const cli = startCLI([fixtures.path('debugger/backtrace.js')]);
const cli = startCLI(['--port=0', fixtures.path('debugger/backtrace.js')]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-exec.js
Expand Up @@ -10,7 +10,7 @@ const assert = require('assert');

{

const cli = startCLI([fixtures.path('debugger/alive.js')]);
const cli = startCLI(['--port=0', fixtures.path('debugger/alive.js')]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-heap-profiler.js
Expand Up @@ -17,7 +17,7 @@ const filename = path.join(tmpdir.path, 'node.heapsnapshot');
// Heap profiler take snapshot.
{
const opts = { cwd: tmpdir.path };
const cli = startCLI([fixtures.path('debugger/empty.js')], [], opts);
const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')], [], opts);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-help.js
Expand Up @@ -9,7 +9,7 @@ const startCLI = require('../common/debugger');
const assert = require('assert');

{
const cli = startCLI([fixtures.path('debugger/empty.js')]);
const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-list.js
Expand Up @@ -8,7 +8,7 @@ const startCLI = require('../common/debugger');

const assert = require('assert');

const cli = startCLI([fixtures.path('debugger/three-lines.js')]);
const cli = startCLI(['--port=0', fixtures.path('debugger/three-lines.js')]);

(async () => {
await cli.waitForInitialBreak();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-low-level.js
Expand Up @@ -9,7 +9,7 @@ const assert = require('assert');

// Debugger agent direct access.
{
const cli = startCLI([fixtures.path('debugger/three-lines.js')]);
const cli = startCLI(['--port=0', fixtures.path('debugger/three-lines.js')]);
const scriptPattern = /^\* (\d+): \S+debugger(?:\/|\\)three-lines\.js/m;

function onFatal(error) {
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-object-type-remote-object.js
Expand Up @@ -8,7 +8,7 @@ const startCLI = require('../common/debugger');

const assert = require('assert');

const cli = startCLI([fixtures.path('debugger/empty.js')]);
const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')]);

(async () => {
await cli.waitForInitialBreak();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-preserve-breaks.js
Expand Up @@ -13,7 +13,7 @@ const path = require('path');
{
const scriptFullPath = fixtures.path('debugger', 'three-lines.js');
const script = path.relative(process.cwd(), scriptFullPath);
const cli = startCLI([script]);
const cli = startCLI(['--port=0', script]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-profile-command.js
Expand Up @@ -10,7 +10,7 @@ const assert = require('assert');
const fs = require('fs');
const path = require('path');

const cli = startCLI([fixtures.path('debugger/empty.js')]);
const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')]);

const rootDir = path.resolve(__dirname, '..', '..');

Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-profile.js
Expand Up @@ -14,7 +14,7 @@ function delay(ms) {

// Profiles.
{
const cli = startCLI([fixtures.path('debugger/empty.js')]);
const cli = startCLI(['--port=0', fixtures.path('debugger/empty.js')]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-restart-message.js
Expand Up @@ -14,7 +14,7 @@ const startCLI = require('../common/debugger');
// Using `restart` should result in only one "Connect/For help" message.
{
const script = fixtures.path('debugger', 'three-lines.js');
const cli = startCLI([script]);
const cli = startCLI(['--port=0', script]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-run-after-quit-restart.js
Expand Up @@ -13,7 +13,7 @@ const path = require('path');
{
const scriptFullPath = fixtures.path('debugger', 'three-lines.js');
const script = path.relative(process.cwd(), scriptFullPath);
const cli = startCLI([script]);
const cli = startCLI(['--port=0', script]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-sb-before-load.js
Expand Up @@ -17,7 +17,7 @@ const path = require('path');
const otherScriptFullPath = fixtures.path('debugger', 'cjs', 'other.js');
const otherScript = path.relative(process.cwd(), otherScriptFullPath);

const cli = startCLI([script]);
const cli = startCLI(['--port=0', script]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-scripts.js
Expand Up @@ -11,7 +11,7 @@ const assert = require('assert');
// List scripts.
{
const script = fixtures.path('debugger', 'three-lines.js');
const cli = startCLI([script]);
const cli = startCLI(['--port=0', script]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-use-strict.js
Expand Up @@ -11,7 +11,7 @@ const assert = require('assert');
// Test for files that start with strict directive.
{
const script = fixtures.path('debugger', 'use-strict.js');
const cli = startCLI([script]);
const cli = startCLI(['--port=0', script]);

function onFatal(error) {
cli.quit();
Expand Down
2 changes: 1 addition & 1 deletion test/sequential/test-debugger-watchers.js
Expand Up @@ -10,7 +10,7 @@ const assert = require('assert');

// Stepping through breakpoints.
{
const cli = startCLI([fixtures.path('debugger/break.js')]);
const cli = startCLI(['--port=0', fixtures.path('debugger/break.js')]);

function onFatal(error) {
cli.quit();
Expand Down