jstests/noPassthroughWithMongod/capped6.js
/*
 * Prepare the values to insert and create the capped collection.
 */
Prepare the values to insert and create the capped collection.
Prepare the values to insert and create the capped collection .
function prepareCollection(shouldReverse) {
    coll.drop();
    assert.commandWorked(db.createCollection("capped6", {capped: true, size: 1000}));
    var valueArray = new Array(maxDocuments);
    var c = "";
    for (i = 0; i < maxDocuments; ++i, c += "-") {
        valueArray[i] = {a: c};
    }
    if (shouldReverse) {
        valueArray.reverse();
    }
    return valueArray;
}
function prepareCollection ( shouldReverse ) { coll . drop ( ) ; assert . commandWorked ( db . createCollection ( "capped6" , { capped : true , size : 1000 } ) ) ; var valueArray = new Array ( maxDocuments ) ; var c = "" ; for ( i = 0 ; i < maxDocuments ; ++ i , c += "-" ) { valueArray [ i ] = { a : c } ; } if ( shouldReverse ) { valueArray . reverse ( ) ; } return valueArray ; }
Prepare the values to insert and create the capped collection.
Prepare the values to insert and create the capped collection .
// The a values are strings of increasing length.