summaryrefslogtreecommitdiff
path: root/jstests/core/evalg.js
blob: dcb5b98f00004c3d56c7b5943ae8d71f04ef27ec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// Cannot implicitly shard accessed collections because unsupported use of sharded collection
// from db.eval.
// @tags: [assumes_unsharded_collection, requires_non_retryable_commands]

// 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();
}));