From 7e45d4f0764701c62ede8b07634de3b0e693e7e9 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Tue, 15 Mar 2016 15:19:32 -0700 Subject: [PATCH] test: minimize test-http-get-pipeline-problem Reduce resoures required by test. Clarify comment explaining source of test and what the test is looking for. Fixes: https://github.com/nodejs/node/issues/5725 PR-URL: https://github.com/nodejs/node/pull/5728 Reviewed-By: Colin Ihrig Reviewed-By: James M Snell --- test/parallel/test-http-get-pipeline-problem.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/test/parallel/test-http-get-pipeline-problem.js b/test/parallel/test-http-get-pipeline-problem.js index 4f0d52a..de339e5 100644 --- a/test/parallel/test-http-get-pipeline-problem.js +++ b/test/parallel/test-http-get-pipeline-problem.js @@ -1,19 +1,21 @@ 'use strict'; -// We are demonstrating a problem with http.get when queueing up many -// transfers. The server simply introduces some delay and sends a file. -// Note this is demonstrated with connection: close. +// In previous versions of Node.js (e.g., 0.6.0), this sort of thing would halt +// after http.globalAgent.maxSockets number of files. +// See https://groups.google.com/forum/#!topic/nodejs-dev/V5fB69hFa9o var common = require('../common'); var assert = require('assert'); var http = require('http'); var fs = require('fs'); +http.globalAgent.maxSockets = 1; + common.refreshTmpDir(); var image = fs.readFileSync(common.fixturesDir + '/person.jpg'); console.log('image.length = ' + image.length); -var total = 100; +var total = 10; var requests = 0, responses = 0; var server = http.Server(function(req, res) { -- 2.7.4