Skip to content

Commit a38b614

Browse 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 fabc33a commit a38b614

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
'use strict';
2-
varassert=require('assert');
3-
varcommon=require('../common');
4-
varfork=require('child_process').fork;
5-
varnet=require('net');
2+
constassert=require('assert');
3+
constcommon=require('../common');
4+
constfork=require('child_process').fork;
5+
constnet=require('net');
66

77
// progress tracker
88
functionProgressTracker(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-
varconnections=newProgressTracker(10,progress.done.bind(progress));
81-
varclosed=newProgressTracker(10,progress.done.bind(progress));
79+
// we expect 4 connections and close events
80+
varconnections=newProgressTracker(4,progress.done.bind(progress));
81+
varclosed=newProgressTracker(4,progress.done.bind(progress));
8282

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

0 commit comments

Comments
 (0)