summaryrefslogtreecommitdiff
path: root/test/sequential/test-http-regr-gh-2928.js
diff options
context:
space:
mode:
authorRich Trott <rtrott@gmail.com>2016-02-08 21:26:10 -0800
committerRich Trott <rtrott@gmail.com>2016-02-10 12:23:28 -0800
commit2848f84332dc2292fd08df083640ac09e5e571aa (patch)
tree6ff6eef285ce5938cff2867bcf862c426fc79768 /test/sequential/test-http-regr-gh-2928.js
parent24667eeff8d37755e58f1e3fc87d5e8977eab057 (diff)
downloadandroid-node-v8-2848f84332dc2292fd08df083640ac09e5e571aa.tar.gz
android-node-v8-2848f84332dc2292fd08df083640ac09e5e571aa.tar.bz2
android-node-v8-2848f84332dc2292fd08df083640ac09e5e571aa.zip
test: fix flaky test-http-regr-gh-2928
Fix flaky test-http-regr-gh-2928 that has been failing on Raspberry Pi devices in CI. Fixes: https://github.com/nodejs/node/issues/4830 PR-URL: https://github.com/nodejs/node/pull/5154 Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Rod Vagg <r@va.gg> Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Diffstat (limited to 'test/sequential/test-http-regr-gh-2928.js')
-rw-r--r--test/sequential/test-http-regr-gh-2928.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/sequential/test-http-regr-gh-2928.js b/test/sequential/test-http-regr-gh-2928.js
index 92cfd9ca35..975eb84e76 100644
--- a/test/sequential/test-http-regr-gh-2928.js
+++ b/test/sequential/test-http-regr-gh-2928.js
@@ -1,3 +1,6 @@
+// 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');
@@ -5,8 +8,7 @@ const httpCommon = require('_http_common');
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++)
@@ -41,10 +43,7 @@ var server = net.createServer(function(c) {
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);