jstests/change_streams/change_streams_lookup_preimage_with_chunk_migration.js
// Verifies that expected 'fromMigrate' events are observed in the oplog for the specified shard.
Verifies that expected 'fromMigrate' events are observed in the oplog for the specified shard.
Verifies that expected ' fromMigrate ' events are observed in the oplog for the specified shard .
function verifyFromMigrateOplogEvents(shard, docId, ops) {
    const oplogEvents = shard.getDB("local")
                            .getCollection("oplog.rs")
                            .find({"fromMigrate": true, "o._id": docId})
                            .toArray();
    assert.eq(oplogEvents.length, ops.length, oplogEvents);
    for (let idx = 0; idx < oplogEvents.length; idx++) {
        assert.eq(oplogEvents[idx].op, ops[idx], oplogEvents[idx]);
        assert.eq(oplogEvents[idx].o._id, docId, oplogEvents[idx]);
    }
}
function verifyFromMigrateOplogEvents ( shard , docId , ops ) { const oplogEvents = shard . getDB ( "local" ) . getCollection ( "oplog.rs" ) . find ( { "fromMigrate" : true , "o._id" : docId } ) . toArray ( ) ; assert . eq ( oplogEvents . length , ops . length , oplogEvents ) ; for ( let idx = 0 ; idx < oplogEvents . length ; idx ++ ) { assert . eq ( oplogEvents [ idx ] . op , ops [ idx ] , oplogEvents [ idx ] ) ; assert . eq ( oplogEvents [ idx ] . o . _id , docId , oplogEvents [ idx ] ) ; } }
Verifies that expected 'fromMigrate' events are observed in the oplog for the specified shard.
Verifies that expected ' fromMigrate ' events are observed in the oplog for the specified shard .