Browse Source

Fix race conditions in test-http-upgrade-client2

v0.7.4-release
Ryan Dahl 14 years ago
parent
commit
40f675b64b
  1. 8
      test/simple/test-http-upgrade-client2.js

8
test/simple/test-http-upgrade-client2.js

@ -12,9 +12,11 @@ server.on('upgrade', function(req, socket, head) {
socket.end();
});
});
server.listen(8000);
var client = http.createClient(8000);
server.listen(common.PORT, function () {
var client = http.createClient(common.PORT);
function upgradeRequest(fn) {
var request = client.request('GET', '/', {
@ -59,6 +61,8 @@ upgradeRequest(function() {
});
});
});
process.on('exit', function () {
assert.equal(2, successCount);
});

Loading…
Cancel
Save