Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: minimize test-http-get-pipeline-problem #5728

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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