Skip to content

Commit

Permalink
Fix foreverFrame test to account for failures prior to timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
halter73 committed Oct 30, 2014
1 parent 88d5a95 commit 2f66221
Showing 1 changed file with 6 additions and 4 deletions.
Expand Up @@ -61,10 +61,12 @@ QUnit.asyncTimeoutTest("foreverFrame transport does not trigger verifyLastActive
end();
};

connection._.onFailedTimeoutHandle = window.setTimeout(function () {
assert.comment("FailedTimeoutHandle is called.");
end();
}, 5000);
connection.disconnected(function () {
assert.comment("Connection successfully transitioned to the disconnecting state.");

// Give time for any unexpected calls to verifyLastActive
window.setTimeout(end, 1000)
});

connection.start({ transport: "foreverFrame" }).done(function () {
assert.fail("Connection should not be connected.");
Expand Down

0 comments on commit 2f66221

Please sign in to comment.