summaryrefslogtreecommitdiff
path: root/jstests/core/cursor1.js
blob: 1cb00cc82fb0d78f09bbc9ecb9f1c1c6487f82ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// @tags: [requires_getmore, requires_fastcount]

t = db.cursor1;
t.drop();

big = "";
while (big.length < 50000)
    big += "asdasdasdasdsdsdadsasdasdasD";

num = Math.ceil(10000000 / big.length);

for (var i = 0; i < num; i++) {
    t.save({num: i, str: big});
}

assert.eq(num, t.find().count());
assert.eq(num, t.find().itcount());

assert.eq(num / 2, t.find().limit(num / 2).itcount());

t.drop();  // save some space