2015-03-09 13:25:06 -04:00
|
|
|
// SERVER-17499: Test behavior of getMore on aggregation cursor under eval command.
|
|
|
|
|
db.evalg.drop();
|
2016-03-09 12:17:50 -05:00
|
|
|
for (var i = 0; i < 102; ++i) {
|
2015-03-09 13:25:06 -04:00
|
|
|
db.evalg.insert({});
|
|
|
|
|
}
|
2016-05-28 17:55:12 -04:00
|
|
|
assert.eq(102, db.eval(function() {
|
|
|
|
|
var cursor = db.evalg.aggregate();
|
|
|
|
|
assert(cursor.hasNext());
|
|
|
|
|
assert.eq(101, cursor.objsLeftInBatch());
|
|
|
|
|
return cursor.itcount();
|
|
|
|
|
}));
|