Details
Description
This test sets the maxTimeMS for a getMore command to be 1 minute. This is too low and should be bumped higher – if the machine running the test is slow, this assertion that the getMore returns 1 document in its batch will fail, because an empty batch will be returned (but with no error set) if the maxTimeMS is exceeded.
awaitdata_getmore_cmd.js |
|
193
|
cmdRes = db.runCommand(
|
194
|
{getMore: cmdRes.cursor.id, collection: collName, maxTimeMS: getMoreMaxTimeMS});
|
195
|
assert.commandWorked(cmdRes);
|
196
|
assert.gt(cmdRes.cursor.id, NumberLong(0));
|
197
|
assert.eq(cmdRes.cursor.ns, coll.getFullName());
|
198
|
assert.eq(cmdRes.cursor.nextBatch.length, 1);
|
199
|
assert.docEq(cmdRes.cursor.nextBatch[0], {_id: "match", x: 1}); |