jstests/change_streams/change_streams_lookup_preimage_with_chunk_migration.js
// Verifies that expected pre-images are stored in the pre-image collection for the specified shard.
Verifies that expected pre-images are stored in the pre-image collection for the specified shard.
Verifies that expected pre - images are stored in the pre - image collection for the specified shard .
function verifyPreImages(shard, docId, annotations) {
    const foundPreImages = shard.getDB("config")
                               .getCollection("system.preimages")
                               .find({"preImage._id": docId})
                               .toArray();
    assert.eq(foundPreImages.length, annotations.length, foundPreImages);
    for (let idx = 0; idx < foundPreImages.length; idx++) {
        assert.eq(foundPreImages[idx].preImage._id, docId, foundPreImages[idx].preImage);
        assert.eq(
            foundPreImages[idx].preImage.annotate, annotations[idx], foundPreImages[idx].preImage);
    }
}
function verifyPreImages ( shard , docId , annotations ) { const foundPreImages = shard . getDB ( "config" ) . getCollection ( "system.preimages" ) . find ( { "preImage._id" : docId } ) . toArray ( ) ; assert . eq ( foundPreImages . length , annotations . length , foundPreImages ) ; for ( let idx = 0 ; idx < foundPreImages . length ; idx ++ ) { assert . eq ( foundPreImages [ idx ] . preImage . _id , docId , foundPreImages [ idx ] . preImage ) ; assert . eq ( foundPreImages [ idx ] . preImage . annotate , annotations [ idx ] , foundPreImages [ idx ] . preImage ) ; } }
Verifies that expected pre-images are stored in the pre-image collection for the specified shard.
Verifies that expected pre - images are stored in the pre - image collection for the specified shard .