summaryrefslogtreecommitdiff
path: root/jstests/core/evalg.js
blob: 570464cbce2ad479d04b046d41a19090a2bf711a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// SERVER-17499: Test behavior of getMore on aggregation cursor under eval command.
db.evalg.drop();
for (var i = 0; i < 102; ++i) {
    db.evalg.insert({});
}
assert.eq(102,
          db.eval(function() {
              var cursor = db.evalg.aggregate();
              assert(cursor.hasNext());
              assert.eq(101, cursor.objsLeftInBatch());
              return cursor.itcount();
          }));