Skip to content

Commit 70bd2af

Browse files
authored
tests/perf: fix doc creation in basic-gets (#8797)
If test param ITERATIONS is specified as larger than 1000, after the 1000th iteration this test currently changes behaviour from fetching existing docs to fetching non-existent docs. The original intention seems to be that the number of docs created should be the same as the number of iterations. See e.g. 7089d39
1 parent 288714d commit 70bd2af

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/performance/perf.basics.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ module.exports = function (PouchDB, callback) {
125125
iterations: 1000,
126126
setup: function (db, callback) {
127127
var docs = [];
128-
for (var i = 0; i < 1000; i++) {
128+
for (var i = 0; i < this.iterations; i++) {
129129
docs.push({_id : commonUtils.createDocId(i),
130130
foo : 'bar', baz : 'quux'});
131131
}

0 commit comments

Comments
 (0)