* adding backend guard to network test step

This commit is contained in:
Seth Call 2014-05-29 21:13:50 -05:00
parent 133722f753
commit 4919b92771
1 changed files with 11 additions and 1 deletions

View File

@ -161,6 +161,12 @@
testFinished();
}
function clearBackendGuard() {
if(backendGuardTimeout) {
clearTimeout(backendGuardTimeout);
backendGuardTimeout = null;
}
}
function attemptTestPass() {
@ -180,7 +186,7 @@
updateProgress(0, false);
backendGuardTimeout = setTimeout(function(){backendTimedOut()}, 10000);
backendGuardTimeout = setTimeout(function(){backendTimedOut()}, gon.ftue_network_test_duration + 1000);
context.jamClient.TestNetworkPktBwRate(serverClientId, TEST_SUCCESS_CALLBACK, TEST_TIMEOUT_CALLBACK,
NETWORK_TEST_TYPES.PktTest400LowLatency,
@ -269,6 +275,8 @@
}
function networkTestSuccess(data) {
clearBackendGuard();
var attempt = getCurrentAttempt();
function refineTest(up) {
@ -378,6 +386,8 @@
}
function networkTestTimeout(data) {
clearBackendGuard();
logger.warn("network timeout when testing latency test: " + data);
var attempt = getCurrentAttempt();