mirror of https://github.com/nodejs/node.git
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 <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>pull/5791/head
parent
4fe02e23af
commit
ccb7b45ba0
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue