Bug 1101770 - add an over all timeout for steeplecahse tests. r=spolk

This commit is contained in:
Nils Ohlmeier [:drno] 2014-11-19 14:01:00 +01:00
parent fb266a4b4c
commit 13fc044776
2 changed files with 12 additions and 0 deletions

View File

@ -677,6 +677,17 @@ PeerConnectionTest.prototype.setStepTimeout = function(ms) {
}.bind(this), ms);
};
/**
* Set a timeout for the over all PeerConnectionTest
* @param {long] ms the number of milliseconds to allow for the test
*/
PeerConnectionTest.prototype.setTimeout = function(ms) {
this._timeout = setTimeout(function() {
ok(false, "PeerConnectionTest timed out");
this.teardown();
}.bind(this), ms);
};
/**
* Creates an answer for the specified peer connection instance
* and automatically handles the failure case.

View File

@ -67,6 +67,7 @@ var commandsPeerConnection = [
'PC_SETUP_SIGNALING_CLIENT',
function (test) {
if (test.steeplechase) {
test.setTimeout(30000);
test.setupSignalingClient();
test.registerSignalingCallback("ice_candidate", function (message) {
var pc = test.pcRemote ? test.pcRemote : test.pcLocal;