jstests/concurrency/fsm_workload_helpers/update_in_transaction_states.js
/**
 * Asserts all documents assigned to this thread match their expected values.
 */
Asserts all documents assigned to this thread match their expected values.
Asserts all documents assigned to this thread match their expected values .
function verifyDocuments(db, collName, tid) {
    const docs = db[collName].find({tid: tid}).toArray();
    docs.forEach(doc => {
        const expectedCounter = expectedCounters[collName][doc._id];
        assertWhenOwnColl.eq(expectedCounter, doc.counter, () => {
            return 'unexpected counter value for collection ' + db[collName] +
                ', doc: ' + tojson(doc);
        });
    });
}
function verifyDocuments ( db , collName , tid ) { const docs = db [ collName ] . find ( { tid : tid } ) . toArray ( ) ; docs . forEach ( doc => { const expectedCounter = expectedCounters [ collName ] [ doc . _id ] ; assertWhenOwnColl . eq ( expectedCounter , doc . counter , ( ) => { return 'unexpected counter value for collection ' + db [ collName ] + ', doc: ' + tojson ( doc ) ; } ) ; } ) ; }
Asserts all documents assigned to this thread match their expected values.
Asserts all documents assigned to this thread match their expected values .