-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Description
Browser: webkit
Observed
There appears to be a race condition in pouchdb-adapter-memory which means that the result of allDocs() can sometimes return a different value for total_rows vs result.rows.length.
Expected
Calling db.allDocs() without args should return a .rows array prop with length equal to returned .total_rows value.
Example
build: https://github.com/pouchdb/pouchdb/actions/runs/8567263981/job/23559252499
logs
1 failing
1) test.all_docs.js-http
test total_rows with a variety of criteria * 100:
correctly return total_rows
+ expected - actual
-801
+800
@http://127.0.0.1:8000/tests/integration/test.all_docs.js:489:36
Test Code
return db.allDocs();
}).then(function (res) {
res.rows.should.have.length(800, 'correctly return rows');
res.total_rows.should.equal(800, 'correctly return total_rows');Metadata
Metadata
Assignees
Labels
No labels