Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
test: use dynamic port in test-dgram-bind-shared-ports
Use of common.PORT in parallel tests is not completely safe (because
the same port can be previously assigned to another test running in
parallel if that test uses port 0 to get an arbitrary available port).

Remove common.PORT from test-dgram-bind-shared-ports.
  • Loading branch information
orafaelfragoso committed May 13, 2017
commit 8fdf39004aae8da3225727008e7e1dc0616051d8
4 changes: 2 additions & 2 deletions test/parallel/test-dgram-bind-shared-ports.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ if (cluster.isMaster) {

socket1.bind({
address: 'localhost',
port: common.PORT,
port: 0,
exclusive: false
}, () => {
socket2.bind({ port: common.PORT + 1, exclusive: true }, () => {
socket2.bind({ port: socket1.address().port + 1, exclusive: true }, () => {
// the first worker should succeed
process.send('success');
});
Expand Down