diff options
author | Roald de Vries <roald@webthusiast.nl> | 2015-12-17 21:50:14 +0100 |
---|---|---|
committer | Roald de Vries <roald@webthusiast.nl> | 2015-12-17 21:56:14 +0100 |
commit | 8deaf5fa53f86e4029f1548a118d8965e9a46a1e (patch) | |
tree | 9d3763f887299104df8679407ce97d837db67b91 | |
parent | a37799a685c10590b16c116191db5775de15d5db (diff) | |
download | couchdb-2876-js-tests-merged.tar.gz |
js tests: fix reduce.js2876-js-tests-merged
-rw-r--r-- | test/javascript/tests/reduce.js | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/test/javascript/tests/reduce.js b/test/javascript/tests/reduce.js index 9c373e4b1..4b6be6fa0 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"); } |