Skip to content
This repository has been archived by the owner on Apr 22, 2023. It is now read-only.

Commit

Permalink
test: fix test-http-pipeline-flood
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
orangemocha authored and indutny committed Feb 9, 2014
1 parent eadb4f5 commit e3ec2f7
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions test/simple/test-http-pipeline-flood.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
}
Expand Down

0 comments on commit e3ec2f7

Please sign in to comment.