Skip to content

Commit 7853b16

Browse files
committed
test: fix flaky test-http-regr-nodejsgh-2928
Fix flaky test-http-regr-nodejsgh-2928 that has been failing on Raspberry Pi devices in CI. Fixes: nodejs#4830
1 parent dccccbb commit 7853b16

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

test/sequential/sequential.status

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ prefix sequential
1010

1111
[$system==linux]
1212
test-vm-syntax-error-stderr : PASS,FLAKY
13-
test-http-regr-gh-2928 : PASS,FLAKY
1413

1514
[$system==macos]
1615

test/sequential/test-http-regr-gh-2928.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
1+
// This test is designed to fail with a segmentation fault in Node.js 4.1.0 and
2+
// execute without issues in Node.js 4.1.1 and up.
3+
14
'use strict';
25
const common = require('../common');
36
const assert = require('assert');
47
const httpCommon = require('_http_common');
58
const HTTPParser = process.binding('http_parser').HTTPParser;
69
const net = require('net');
710

8-
const PARALLEL = 30;
9-
const COUNT = httpCommon.parsers.max + 100;
11+
const COUNT = httpCommon.parsers.max + 1;
1012

1113
const parsers = new Array(COUNT);
1214
for (var i = 0; i < parsers.length; i++)
@@ -41,10 +43,7 @@ var server = net.createServer(function(c) {
4143
c.end('HTTP/1.1 200 OK\r\n\r\n', function() {
4244
c.destroySoon();
4345
});
44-
}).listen(common.PORT, function() {
45-
for (var i = 0; i < PARALLEL; i++)
46-
execAndClose();
47-
});
46+
}).listen(common.PORT, execAndClose);
4847

4948
process.on('exit', function() {
5049
assert.equal(gotResponses, COUNT);

0 commit comments

Comments
 (0)