Fix race conditions in test-http-upgrade-client2
This commit is contained in:
parent
4adadc38f4
commit
40f675b64b
@ -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…
x
Reference in New Issue
Block a user