jstests/core/tailable_getmore_batch_size.js
/**
 * Runs a find command with a batchSize of 'batchSize' to establish a cursor. Asserts that the
 * command worked and that the cursor id is not 0, then returns the cursor id.
 */
Runs a find command with a batchSize of 'batchSize' to establish a cursor. Asserts that the
command worked and that the cursor id is not 0, then returns the cursor id.
Runs a find command with a batchSize of ' batchSize ' to establish a cursor . Asserts that the command worked and that the cursor id is not 0 then returns the cursor id .
function openCursor({batchSize, tailable, awaitData}) {
    const findRes = assert.commandWorked(db.runCommand(
        {find: collName, tailable: tailable, awaitData: awaitData, batchSize: batchSize}));
    assert.eq(findRes.cursor.firstBatch.length, batchSize);
    assert.neq(findRes.cursor.id, 0);
    assert.eq(findRes.cursor.ns, coll.getFullName());
    return findRes.cursor.id;
}
function openCursor ( { batchSize , tailable , awaitData } ) { const findRes = assert . commandWorked ( db . runCommand ( { find : collName , tailable : tailable , awaitData : awaitData , batchSize : batchSize } ) ) ; assert . eq ( findRes . cursor . firstBatch . length , batchSize ) ; assert . neq ( findRes . cursor . id , 0 ) ; assert . eq ( findRes . cursor . ns , coll . getFullName ( ) ) ; return findRes . cursor . id ; }
Runs a find command with a batchSize of 'batchSize' to establish a cursor.
Runs a find command with a batchSize of ' batchSize ' to establish a cursor .