Skip to content

Commit b352cc7

Browse files
TrottFishrock123
authored andcommitted
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: #5725 PR-URL: #5728 Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 20a68e9 commit b352cc7

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

test/parallel/test-http-get-pipeline-problem.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,21 @@
11
'use strict';
2-
// We are demonstrating a problem with http.get when queueing up many
3-
// transfers. The server simply introduces some delay and sends a file.
4-
// Note this is demonstrated with connection: close.
2+
// In previous versions of Node.js (e.g., 0.6.0), this sort of thing would halt
3+
// after http.globalAgent.maxSockets number of files.
4+
// See https://groups.google.com/forum/#!topic/nodejs-dev/V5fB69hFa9o
55
var common = require('../common');
66
var assert = require('assert');
77
var http = require('http');
88
var fs = require('fs');
99

10+
http.globalAgent.maxSockets = 1;
11+
1012
common.refreshTmpDir();
1113

1214
var image = fs.readFileSync(common.fixturesDir + '/person.jpg');
1315

1416
console.log('image.length = ' + image.length);
1517

16-
var total = 100;
18+
var total = 10;
1719
var requests = 0, responses = 0;
1820

1921
var server = http.Server(function(req, res) {

0 commit comments

Comments
 (0)