Skip to content

Commit

Permalink
test: remove a snapshot blob from test-inspect-address-in-use.js
Browse files Browse the repository at this point in the history
This removes a snapshot blob generated by
`test/parallel/test-inspect-address-in-use.js`.

Signed-off-by: Daeyeon Jeong <[email protected]>
PR-URL: #45132
Fixes: #45017
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Juan José Arboleda <[email protected]>
  • Loading branch information
daeyeon authored and RafaelGSS committed Nov 1, 2022
1 parent 26c9a3c commit 5be7aee
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions test/parallel/test-inspect-address-in-use.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ common.skipIfInspectorDisabled();
const { spawnSync } = require('child_process');
const { createServer } = require('http');
const assert = require('assert');
const tmpdir = require('../common/tmpdir');
const fixtures = require('../common/fixtures');
const entry = fixtures.path('empty.js');
const { Worker } = require('worker_threads');
Expand All @@ -21,10 +22,10 @@ function testOnServerListen(fn) {
server.listen(0, '127.0.0.1');
}

function testChildProcess(getArgs, exitCode) {
function testChildProcess(getArgs, exitCode, options) {
testOnServerListen((server) => {
const { port } = server.address();
const child = spawnSync(process.execPath, getArgs(port));
const child = spawnSync(process.execPath, getArgs(port), options);
const stderr = child.stderr.toString().trim();
const stdout = child.stdout.toString().trim();
console.log('[STDERR]');
Expand All @@ -40,8 +41,12 @@ function testChildProcess(getArgs, exitCode) {
});
}

tmpdir.refresh();

testChildProcess(
(port) => [`--inspect=${port}`, '--build-snapshot', entry], 0);
(port) => [`--inspect=${port}`, '--build-snapshot', entry], 0,
{ cwd: tmpdir.path });

testChildProcess(
(port) => [`--inspect=${port}`, entry], 0);

Expand Down

0 comments on commit 5be7aee

Please sign in to comment.