Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 1933efa

Browse filesBrowse files
Trottcodebytere
authored andcommitted
test: remove common.PORT from test-net-write-callbacks.js
Switch test-net-write-callbacks.js from common.PORT to a port assigned by the operating system. PR-URL: #31839 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Shelley Vohr <codebytere@gmail.com> Reviewed-By: Richard Lau <riclau@uk.ibm.com>
1 parent f2389eb commit 1933efa
Copy full SHA for 1933efa

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Open diff view settings
Collapse file

‎test/pummel/test-net-write-callbacks.js‎

Copy file name to clipboardExpand all lines: test/pummel/test-net-write-callbacks.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
// USE OR OTHER DEALINGS IN THE SOFTWARE.
2121

2222
'use strict';
23-
const common = require('../common');
23+
require('../common');
2424
const net = require('net');
2525
const assert = require('assert');
2626

@@ -55,8 +55,8 @@ function makeCallback(c) {
5555
};
5656
}
5757

58-
server.listen(common.PORT, function() {
59-
const client = net.createConnection(common.PORT);
58+
server.listen(0, function() {
59+
const client = net.createConnection(server.address().port);
6060

6161
client.on('connect', function() {
6262
for (let i = 0; i < N; i++) {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.