Skip to content

Commit

Permalink
Fixed should trigger ping timeout test
Browse files Browse the repository at this point in the history
  • Loading branch information
xixixao committed Jan 19, 2013
1 parent 0b9d9c4 commit 86366e8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions test/server.js
Expand Up @@ -553,7 +553,7 @@ describe('server', function () {

it('should trigger with connection `ping timeout` ' +
'after `pingInterval + pingTimeout`', function (done) {
var opts = { allowUpgrades: false, pingInterval: 30, pingTimeout: 10 };
var opts = { allowUpgrades: false, pingInterval: 300, pingTimeout: 100 };
var engine = listen(opts, function (port) {
var socket = new eioc.Socket('ws://localhost:%d'.s(port));
var clientCloseReason = null;
Expand All @@ -569,14 +569,14 @@ describe('server', function () {
setTimeout(function() {
socket.onPacket = function(){};
expect(clientCloseReason).to.be(null);
}, 15);
}, 150);
setTimeout(function() {
expect(clientCloseReason).to.be(null);
}, 35);
}, 350);
setTimeout(function() {
expect(clientCloseReason).to.be("ping timeout");
done();
}, 50);
}, 500);
});
});
});
Expand Down

0 comments on commit 86366e8

Please sign in to comment.