jstests/sharding/change_streams/change_stream_lookup_preimage_with_resharding.js
// Verifies that expected documents are present in the pre-image collection at the specified shard.
Verifies that expected documents are present in the pre-image collection at the specified shard.
Verifies that expected documents are present in the pre - image collection at the specified shard .
function verifyPreImages(conn, expectedPreImageDocuments) {
    const preImageDocuments =
        conn.getDB("config").getCollection("system.preimages").find().toArray();
    assert.eq(preImageDocuments.length, expectedPreImageDocuments.length, preImageDocuments);
    for (let idx = 0; idx < preImageDocuments.length; idx++) {
        assert.eq(preImageDocuments[idx].preImage,
                  expectedPreImageDocuments[idx],
                  preImageDocuments[idx].preImage);
    }
}
function verifyPreImages ( conn , expectedPreImageDocuments ) { const preImageDocuments = conn . getDB ( "config" ) . getCollection ( "system.preimages" ) . find ( ) . toArray ( ) ; assert . eq ( preImageDocuments . length , expectedPreImageDocuments . length , preImageDocuments ) ; for ( let idx = 0 ; idx < preImageDocuments . length ; idx ++ ) { assert . eq ( preImageDocuments [ idx ] . preImage , expectedPreImageDocuments [ idx ] , preImageDocuments [ idx ] . preImage ) ; } }
Verifies that expected documents are present in the pre-image collection at the specified shard.
Verifies that expected documents are present in the pre - image collection at the specified shard .