+// This test is designed to fail with a segmentation fault in Node.js 4.1.0 and
+// execute without issues in Node.js 4.1.1 and up.
+
'use strict';
const common = require('../common');
const assert = require('assert');
const HTTPParser = process.binding('http_parser').HTTPParser;
const net = require('net');
-const PARALLEL = 30;
-const COUNT = httpCommon.parsers.max + 100;
+const COUNT = httpCommon.parsers.max + 1;
const parsers = new Array(COUNT);
for (var i = 0; i < parsers.length; i++)
c.end('HTTP/1.1 200 OK\r\n\r\n', function() {
c.destroySoon();
});
-}).listen(common.PORT, function() {
- for (var i = 0; i < PARALLEL; i++)
- execAndClose();
-});
+}).listen(common.PORT, execAndClose);
process.on('exit', function() {
assert.equal(gotResponses, COUNT);