couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rand...@apache.org
Subject git commit: improve the startup delay for js test harness
Date Sun, 08 Jan 2012 01:03:35 GMT
Updated Branches:
  refs/heads/master 2921c7869 -> 2e6049271


improve the startup delay for js test harness

Change waitForSuccess to catch errors in the sync request that's used
to hand control back to the JS engine. Then, use waitForSuccess to
see if CouchDB has started and remove the 1 second sleep before the
tests start.


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/2e604927
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/2e604927
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/2e604927

Branch: refs/heads/master
Commit: 2e60492716658da175f499340678189e1213254c
Parents: 2921c78
Author: Randall Leeds <randall@apache.org>
Authored: Thu Dec 15 19:49:55 2011 -0800
Committer: Randall Leeds <randall@apache.org>
Committed: Sat Jan 7 16:55:24 2012 -0800

----------------------------------------------------------------------
 share/www/script/couch_test_runner.js |    4 +++-
 test/javascript/cli_runner.js         |    1 +
 2 files changed, 4 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/2e604927/share/www/script/couch_test_runner.js
----------------------------------------------------------------------
diff --git a/share/www/script/couch_test_runner.js b/share/www/script/couch_test_runner.js
index c1e7a72..d1a53e9 100644
--- a/share/www/script/couch_test_runner.js
+++ b/share/www/script/couch_test_runner.js
@@ -412,7 +412,9 @@ function waitForSuccess(fun, tag) {
         break;
       } catch (e) {}
       // sync http req allow async req to happen
-      CouchDB.request("GET", "/test_suite_db/?tag="+encodeURIComponent(tag));
+      try {
+        CouchDB.request("GET", "/test_suite_db/?tag="+encodeURIComponent(tag));
+      } catch (e) {}
     }
   }
 }

http://git-wip-us.apache.org/repos/asf/couchdb/blob/2e604927/test/javascript/cli_runner.js
----------------------------------------------------------------------
diff --git a/test/javascript/cli_runner.js b/test/javascript/cli_runner.js
index cdbe2e7..6683ede 100644
--- a/test/javascript/cli_runner.js
+++ b/test/javascript/cli_runner.js
@@ -46,6 +46,7 @@ function runAllTestsConsole() {
 };
 
 try {
+  waitForSuccess(CouchDB.getVersion);
   runAllTestsConsole();
 } catch (e) {
   p("# " + e.toString());


Mime
View raw message