From 8deaf5fa53f86e4029f1548a118d8965e9a46a1e Mon Sep 17 00:00:00 2001 From: Roald de Vries Date: Thu, 17 Dec 2015 21:50:14 +0100 Subject: js tests: fix reduce.js --- test/javascript/tests/reduce.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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"); } -- cgit v1.2.1