jstests/concurrency/fsm_workloads/refine_collection_shard_key_crud_ops.js
// to assert for expected behavior.
to assert for expected behavior.
to assert for expected behavior .
function insertDocs(data, coll) {
        const nDocsToInsert = data.latchCount * 3;
        let bulk = coll.initializeUnorderedBulkOp();
        for (let i = 0; i < nDocsToInsert; ++i) {
            bulk.insert(data.usingNestedKey ? {tid: data.tid, a: i, b: {c: i}}
                                            : {tid: data.tid, a: i, b: i});
        }
        const res = bulk.execute();
        assertAlways.commandWorked(res);
        assertAlways.eq(res.nInserted, nDocsToInsert);
    }
function insertDocs ( data , coll ) { const nDocsToInsert = data . latchCount * 3 ; let bulk = coll . initializeUnorderedBulkOp ( ) ; for ( let i = 0 ; i < nDocsToInsert ; ++ i ) { bulk . insert ( data . usingNestedKey ? { tid : data . tid , a : i , b : { c : i } } : { tid : data . tid , a : i , b : i } ) ; } const res = bulk . execute ( ) ; assertAlways . commandWorked ( res ) ; assertAlways . eq ( res . nInserted , nDocsToInsert ) ; }
to assert for expected behavior.
to assert for expected behavior .