Skip to content

Commit

Permalink
Add test to test queries in large collections to reproduce possible s…
Browse files Browse the repository at this point in the history
…tack trace maximum exceeded errors
  • Loading branch information
saintedlama committed Dec 15, 2015
1 parent 3b8fe9b commit 04d1231
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/test-find-large-collection.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var insert = require('./insert')

var items = []
var itemCount = 10000

for (var i = 0; i < itemCount; i++) {
items.push({ counter: i })
}

insert('find in large collection', items, function (db, t, done) {
db.a.find().toArray(function (err, docs) {
t.error(err)
t.equal(docs.length, itemCount)
done()
})
})

0 comments on commit 04d1231

Please sign in to comment.