Skip to content

Conversation

Trott
Copy link
Member

@Trott Trott commented Apr 18, 2017

Replace common.PORT with available port assigned by the operating
system in test-cluster-dgram-2.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

test dgram cluster

Replace common.PORT with available port assigned by the operating
system in test-cluster-dgram-2.
@Trott Trott added cluster Issues and PRs related to the cluster subsystem. dgram Issues and PRs related to the dgram subsystem / UDP. test Issues and PRs related to the tests. labels Apr 18, 2017
// sending until disconnect.
const interval = setInterval(() => {
socket.send(buf, 0, buf.length, common.PORT, '127.0.0.1');
socket.send(buf, 0, buf.length, process.env.BOUNDPORT, '127.0.0.1');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

may be worthwhile adding an assert to make sure process.env.BOUNDPORT is set

const port = socket.address().port;
// Fork workers.
for (let i = 0; i < NUM_WORKERS; i++)
cluster.fork({BOUNDPORT: port});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@santigimeno
Copy link
Member

It looks like a duplicate of #12487

@Trott
Copy link
Member Author

Trott commented Apr 23, 2017

Closing in favor of #12487

@Trott Trott closed this Apr 23, 2017
@Trott Trott deleted the dgram2 branch January 13, 2022 22:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cluster Issues and PRs related to the cluster subsystem. dgram Issues and PRs related to the dgram subsystem / UDP. test Issues and PRs related to the tests.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants