jstests/libs/change_stream_util.js
/**
 * Asserts that pre-images collection is created in the configDB and has clustered index on _id.
 */
Asserts that pre-images collection is created in the configDB and has clustered index on _id.
Asserts that pre - images collection is created in the configDB and has clustered index on _id .
function assertPreImagesCollectionExists(db) {
    const collectionInfos = findPreImagesCollectionDescriptions(db);
    assert.eq(collectionInfos.cursor.firstBatch.length, 1, collectionInfos);
    const preImagesCollectionDescription = collectionInfos.cursor.firstBatch[0];
    assert.eq(preImagesCollectionDescription.name, "system.preimages");
    assert(preImagesCollectionDescription.hasOwnProperty("options"),
           preImagesCollectionDescription);
    assert(preImagesCollectionDescription.options.hasOwnProperty("clusteredIndex"),
           preImagesCollectionDescription);
    const clusteredIndexDescription = preImagesCollectionDescription.options.clusteredIndex;
    assert(clusteredIndexDescription, preImagesCollectionDescription);
}
function assertPreImagesCollectionExists ( db ) { const collectionInfos = findPreImagesCollectionDescriptions ( db ) ; assert . eq ( collectionInfos . cursor . firstBatch . length , 1 , collectionInfos ) ; const preImagesCollectionDescription = collectionInfos . cursor . firstBatch [ 0 ] ; assert . eq ( preImagesCollectionDescription . name , "system.preimages" ) ; assert ( preImagesCollectionDescription . hasOwnProperty ( "options" ) , preImagesCollectionDescription ) ; assert ( preImagesCollectionDescription . options . hasOwnProperty ( "clusteredIndex" ) , preImagesCollectionDescription ) ; const clusteredIndexDescription = preImagesCollectionDescription . options . clusteredIndex ; assert ( clusteredIndexDescription , preImagesCollectionDescription ) ; }
Asserts that pre-images collection is created in the configDB and has clustered index on _id.
Asserts that pre - images collection is created in the configDB and has clustered index on _id .
// Verifies that the pre-images collection is clustered by _id.