Permalink
Browse files

Added smart backoff of test-execution retries in the JS tests.

git-svn-id: http://svn.getwindmill.com/trunk@1357 78c7df6f-8922-0410-bcd3-9426b1ad491b
  • Loading branch information...
mde committed Jul 31, 2009
1 parent 71cddf2 commit 6fbc55ce2cd270a8771b07609e52d7bba6668c54
Showing with 8 additions and 3 deletions.
  1. +2 −2 test/javascript_tests/initialize.js
  2. +6 −1 windmill/html/js/wm/jstest.js
@@ -28,11 +28,11 @@ windmill.jsTest.register(registeredTests);
//windmill.jsTest.runRegisteredTestsOnly = true;
// Pull in the code for all the tests
-windmill.jsTest.require('wait_xhr.js');
windmill.jsTest.require('json_dom.js');
+windmill.jsTest.require('wait_xhr.js');
windmill.jsTest.require('form_basics.js');
-windmill.jsTest.require('scope.js');
windmill.jsTest.require('jum_basics.js');
+windmill.jsTest.require('scope.js');
windmill.jsTest.require('timer.js');
windmill.jsTest.require('failures.js');
@@ -804,7 +804,12 @@ windmill.jsTest = new function () {
}
else {
_objLookupRetries++;
- this.runNextTest(testName);
+ // Smart backoff for retries -- use the cube of
+ // the retry number for an expanding retry window
+ var delay = Math.pow(_objLookupRetries, 3) * 10;
+ var retryFunc = function () {
+ _this.runNextTest.call(_this, testName); }
+ setTimeout(retryFunc, delay);
return;
}
}

0 comments on commit 6fbc55c

Please sign in to comment.