Browse Source

fix race in test-http-big-proxy-responses.js

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
2219c64a04
  1. 8
      test/disabled/test-http-big-proxy-responses.js

8
test/disabled/test-http-big-proxy-responses.js

@ -18,7 +18,7 @@ var chargen = http.createServer(function (req, res) {
} }
res.end(); res.end();
}); });
chargen.listen(9000); chargen.listen(9000, ready);
// Proxy to the chargen server. // Proxy to the chargen server.
var proxy = http.createServer(function (req, res) { var proxy = http.createServer(function (req, res) {
@ -56,7 +56,7 @@ var proxy = http.createServer(function (req, res) {
proxy_req.end(); proxy_req.end();
}); });
proxy.listen(9001); proxy.listen(9001, ready);
var done = false; var done = false;
@ -94,7 +94,11 @@ function call_chargen(list) {
} }
} }
serversRunning = 0;
function ready () {
if (++serversRunning < 2) return;
call_chargen([ 100, 1000, 10000, 100000, 1000000 ]); call_chargen([ 100, 1000, 10000, 100000, 1000000 ]);
}
process.addListener('exit', function () { process.addListener('exit', function () {
assert.ok(done); assert.ok(done);

Loading…
Cancel
Save