diff options
author | Robert Newson <rnewson@apache.org> | 2011-10-06 20:49:17 +0100 |
---|---|---|
committer | Robert Newson <rnewson@apache.org> | 2011-10-06 20:49:17 +0100 |
commit | a628a43b58c7f85e228b148cea5d74a8b24bff70 (patch) | |
tree | 9a80595a0289b4a4dce73102c2b1bd534f937005 /share/www | |
parent | 4818fdd3269a3082a193ec69f4e8e39d95c15e86 (diff) |
Revert "Remove SpiderMonkey 1.8.5 compatibility"
This reverts commit 5b558c81ed9709fb286a6821e9ae6d6478012c2c.
Diffstat (limited to 'share/www')
-rw-r--r-- | share/www/script/couch_test_runner.js | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/share/www/script/couch_test_runner.js b/share/www/script/couch_test_runner.js index 55a6533f..e14640b6 100644 --- a/share/www/script/couch_test_runner.js +++ b/share/www/script/couch_test_runner.js @@ -414,9 +414,22 @@ function waitForSuccess(fun, tag) { function waitForRestart() { var waiting = true; - while (waiting) { + // Wait for the server to go down but don't + // wait too long because we might miss the + // unavailable period. + var count = 25; + while (waiting && count > 0) { + count--; try { CouchDB.request("GET", "/"); + } catch(e) { + waiting = false; + } + } + // Wait for it to come back up + waiting = true; + while (waiting) { + try { CouchDB.request("GET", "/"); waiting = false; } catch(e) { |