Browse Source

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>
process-exit-stdio-flushing
Rich Trott 9 years ago
committed by James M Snell
parent
commit
ccb7b45ba0
  1. 10
      test/parallel/test-http-get-pipeline-problem.js

10
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) {

Loading…
Cancel
Save