test: fix test-http-pipeline-flood

The number of connections achieved by the test can vary by platform
and by machine. Lowering the acceptance threshold so that the
test passes on Windows.
This commit is contained in:
Alexis Campailla 2014-02-06 05:43:55 -08:00 committed by Fedor Indutny
parent eadb4f5606
commit e3ec2f7dab

View File

@ -71,12 +71,11 @@ function parent() {
assert(gotTimeout);
assert(childClosed);
assert.equal(connections, 1);
// 1213 works out to be the number of requests we end up processing
// before the outgoing connection backs up and requires a drain.
// however, to avoid being unnecessarily tied to a specific magic number,
// and making the test brittle, just assert that it's "a lot", which we
// can safely assume is more than 500.
assert(requests >= 500);
// The number of requests we end up processing before the outgoing
// connection backs up and requires a drain is implementation-dependent.
// We can safely assume is more than 250.
console.log('server got %d requests', requests);
assert(requests >= 250);
console.log('ok');
});
}