couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dav...@apache.org
Subject couchdb commit: updated refs/heads/master to 207a447
Date Tue, 12 Jul 2016 21:31:34 GMT
Repository: couchdb
Updated Branches:
  refs/heads/master 033833408 -> 207a4474c


Actually use new sleep function in the test suite


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

Branch: refs/heads/master
Commit: 207a4474c5f9389bbac394e252f28a3d9a591900
Parents: 0338334
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Tue Jul 12 16:31:24 2016 -0500
Committer: Paul J. Davis <paul.joseph.davis@gmail.com>
Committed: Tue Jul 12 16:31:24 2016 -0500

----------------------------------------------------------------------
 test/javascript/couch_test_runner.js | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/207a4474/test/javascript/couch_test_runner.js
----------------------------------------------------------------------
diff --git a/test/javascript/couch_test_runner.js b/test/javascript/couch_test_runner.js
index 253b545..421abd2 100644
--- a/test/javascript/couch_test_runner.js
+++ b/test/javascript/couch_test_runner.js
@@ -495,11 +495,7 @@ function retry_part(fct, n, duration) {
     }catch(e){
       if(i<n){
         // wait
-        var b4 = (new Date()).getTime();
-        // if this is too bad, we could GET /
-        // or in fact get _changes w/ longpoll on _users or so
-        while(((new Date()).getTime() - b4) < duration) {}
-        continue;
+        sleep(duration);
       }else{
         throw e;
       }
@@ -508,9 +504,5 @@ function retry_part(fct, n, duration) {
 }
 
 function wait(ms) {
-  var t0 = new Date(), t1;
-  do {
-    CouchDB.request("GET", "/");
-    t1 = new Date();
-  } while ((t1 - t0) <= ms);
+  sleep(ms);
 }


Mime
View raw message