Skip to content

Commit

Permalink
test: minimize test-http-get-pipeline-problem
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
Trott authored and Fishrock123 committed Mar 22, 2016
1 parent 20a68e9 commit b352cc7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/parallel/test-http-get-pipeline-problem.js
Original file line number Diff line number Diff line change
@@ -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) {
Expand Down

0 comments on commit b352cc7

Please sign in to comment.