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 69dcbb6

Browse filesBrowse files
TrottMyles Borins
authored andcommitted
test: fix flaky test-child-process-fork-net
Reduce client connections from 10 to 4 in a test that is causing issues on Raspberry Pi 2 devices in CI. Fixes: #5122 PR-URL: #6138 Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
1 parent a97a6a9 commit 69dcbb6
Copy full SHA for 69dcbb6

File tree

Expand file treeCollapse file tree

1 file changed

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

1 file changed

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

‎test/parallel/test-child-process-fork-net.js‎

Copy file name to clipboardExpand all lines: test/parallel/test-child-process-fork-net.js
+8-8Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
2-
var assert = require('assert');
3-
var common = require('../common');
4-
var fork = require('child_process').fork;
5-
var net = require('net');
2+
const assert = require('assert');
3+
const common = require('../common');
4+
const fork = require('child_process').fork;
5+
const net = require('net');
66

77
// progress tracker
88
function ProgressTracker(missing, callback) {
@@ -76,9 +76,9 @@ if (process.argv[2] === 'child') {
7676
server.close();
7777
});
7878

79-
// we expect 10 connections and close events
80-
var connections = new ProgressTracker(10, progress.done.bind(progress));
81-
var closed = new ProgressTracker(10, progress.done.bind(progress));
79+
// we expect 4 connections and close events
80+
var connections = new ProgressTracker(4, progress.done.bind(progress));
81+
var closed = new ProgressTracker(4, progress.done.bind(progress));
8282

8383
// create server and send it to child
8484
var server = net.createServer();
@@ -99,7 +99,7 @@ if (process.argv[2] === 'child') {
9999
if (msg.what === 'listening') {
100100
// make connections
101101
var socket;
102-
for (var i = 0; i < 10; i++) {
102+
for (var i = 0; i < 4; i++) {
103103
socket = net.connect(common.PORT, function() {
104104
console.log('CLIENT: connected');
105105
});

0 commit comments

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