couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sebastia...@apache.org
Subject couchdb commit: updated refs/heads/2876-js-tests-merged to 8deaf5f
Date Thu, 17 Dec 2015 20:59:32 GMT
Repository: couchdb
Updated Branches:
  refs/heads/2876-js-tests-merged a37799a68 -> 8deaf5fa5


js tests: fix reduce.js


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

Branch: refs/heads/2876-js-tests-merged
Commit: 8deaf5fa53f86e4029f1548a118d8965e9a46a1e
Parents: a37799a
Author: Roald de Vries <roald@webthusiast.nl>
Authored: Thu Dec 17 21:50:14 2015 +0100
Committer: Roald de Vries <roald@webthusiast.nl>
Committed: Thu Dec 17 21:56:14 2015 +0100

----------------------------------------------------------------------
 test/javascript/tests/reduce.js | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/8deaf5fa/test/javascript/tests/reduce.js
----------------------------------------------------------------------
diff --git a/test/javascript/tests/reduce.js b/test/javascript/tests/reduce.js
index 9c373e4..4b6be6f 100644
--- a/test/javascript/tests/reduce.js
+++ b/test/javascript/tests/reduce.js
@@ -69,7 +69,10 @@ couchTests.reduce = function(debug) {
       docs.push({keys:["d", "b"]});
       docs.push({keys:["d", "c"]});
       db.bulkSave(docs);
-      var total_docs = ((i - 1) * 10 * 11) + ((j + 1) * 11);
+      // the queries below all create an extra document, adding up to 6 in total
+      var total_docs = ((i - 1) * 10 * 11) + ((j + 1) * 11) + ((i - 1) * 6);
+      // let's buy ourselves some time for the changes to propagate through the cluster
+      for (var k=0; k<10; k++) db.info();
       TEquals(total_docs, db.info().doc_count, "doc count should match");
     }
 


Mime
View raw message