GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — test: fix flaky `test-child-process-pass-fd` · nodejs/node@bb6d6a6

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • test/sequential
    • test-child-process-pass-fd.js
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎test/sequential/test-child-process-pass-fd.js‎

Copy file name to clipboardExpand all lines: test/sequential/test-child-process-pass-fd.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const N = 80;
1414

1515
if (process.argv[2] !== 'child') {
1616
for (let i = 0; i < N; ++i) {
17-
const worker = fork(__filename, ['child', common.PORT + i]);
17+
const worker = fork(__filename, ['child']);
1818
worker.once('message', common.mustCall((msg, handle) => {
1919
assert.strictEqual(msg, 'handle');
2020
assert.ok(handle);
@@ -33,7 +33,6 @@ if (process.argv[2] !== 'child') {
3333
}
3434
} else {
3535
let socket;
36-
const port = process.argv[3];
3736
let cbcalls = 0;
3837
function socketConnected() {
3938
if (++cbcalls === 2)
@@ -47,7 +46,8 @@ if (process.argv[2] !== 'child') {
4746
});
4847
socketConnected();
4948
});
50-
server.listen(port, common.localhostIPv4, () => {
49+
server.listen(0, common.localhostIPv4, () => {
50+
const port = server.address().port;
5151
socket = net.connect(port, common.localhostIPv4, socketConnected);
5252
});
5353
}

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.