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
cmdRes = db.runCommand(
{getMore: cmdRes.cursor.id, collection: collName, maxTimeMS: getMoreMaxTimeMS});
assert.commandWorked(cmdRes);
assert.gt(cmdRes.cursor.id, NumberLong(0));
assert.eq(cmdRes.cursor.ns, coll.getFullName());
assert.eq(cmdRes.cursor.nextBatch.length, 1);
assert.docEq(cmdRes.cursor.nextBatch[0], {_id: "match", x: 1});