From a38b614ae9522e26dc72052f001425467bea98c3 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 9 Apr 2016 16:25:18 -0700 Subject: [PATCH] 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: https://github.com/nodejs/node/issues/5122 PR-URL: https://github.com/nodejs/node/pull/6138 Reviewed-By: Benjamin Gruenbaum --- test/parallel/test-child-process-fork-net.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/parallel/test-child-process-fork-net.js b/test/parallel/test-child-process-fork-net.js index 09ec8e24b9b46c..f815f76a664d9f 100644 --- a/test/parallel/test-child-process-fork-net.js +++ b/test/parallel/test-child-process-fork-net.js @@ -1,8 +1,8 @@ 'use strict'; -var assert = require('assert'); -var common = require('../common'); -var fork = require('child_process').fork; -var net = require('net'); +const assert = require('assert'); +const common = require('../common'); +const fork = require('child_process').fork; +const net = require('net'); // progress tracker function ProgressTracker(missing, callback) { @@ -76,9 +76,9 @@ if (process.argv[2] === 'child') { server.close(); }); - // we expect 10 connections and close events - var connections = new ProgressTracker(10, progress.done.bind(progress)); - var closed = new ProgressTracker(10, progress.done.bind(progress)); + // we expect 4 connections and close events + var connections = new ProgressTracker(4, progress.done.bind(progress)); + var closed = new ProgressTracker(4, progress.done.bind(progress)); // create server and send it to child var server = net.createServer(); @@ -99,7 +99,7 @@ if (process.argv[2] === 'child') { if (msg.what === 'listening') { // make connections var socket; - for (var i = 0; i < 10; i++) { + for (var i = 0; i < 4; i++) { socket = net.connect(common.PORT, function() { console.log('CLIENT: connected'); });