Browse Source

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.
v0.11.12-release
Alexis Campailla 11 years ago
committed by Fedor Indutny
parent
commit
e3ec2f7dab
  1. 11
      test/simple/test-http-pipeline-flood.js

11
test/simple/test-http-pipeline-flood.js

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

Loading…
Cancel
Save