jstests/change_streams/change_streams_lookup_preimage_with_chunk_migration.js
// Verifies that the change streams cursor sees the required events.
Verifies that the change streams cursor sees the required events.
Verifies that the change streams cursor sees the required events .
function verifyChangeStreamEvents(csCursor, events) {
    events.forEach(expEvent => {
        assert.soon(() => csCursor.hasNext());
        const event = csCursor.next();
        assert.eq(event.operationType, expEvent.opType);
        if (event.operationType == "insert") {
            assert.eq(event.documentKey._id, expEvent.id, event);
        } else if (event.operationType == "update") {
            assert.eq(event.documentKey._id, expEvent.id, event);
            assert.eq(event.fullDocumentBeforeChange.annotate, expEvent.prevAnnotate, event);
            assert.eq(event.fullDocument.annotate, expEvent.curAnnotate, event);
        } else if (event.operationType == "delete") {
            assert.eq(event.documentKey._id, expEvent.id, event);
            assert.eq(event.fullDocumentBeforeChange.annotate, expEvent.prevAnnotate, event);
        }
    });
}
function verifyChangeStreamEvents ( csCursor , events ) { events . forEach ( expEvent => { assert . soon ( ( ) => csCursor . hasNext ( ) ) ; const event = csCursor . next ( ) ; assert . eq ( event . operationType , expEvent . opType ) ; if ( event . operationType == "insert" ) { assert . eq ( event . documentKey . _id , expEvent . id , event ) ; } else if ( event . operationType == "update" ) { assert . eq ( event . documentKey . _id , expEvent . id , event ) ; assert . eq ( event . fullDocumentBeforeChange . annotate , expEvent . prevAnnotate , event ) ; assert . eq ( event . fullDocument . annotate , expEvent . curAnnotate , event ) ; } else if ( event . operationType == "delete" ) { assert . eq ( event . documentKey . _id , expEvent . id , event ) ; assert . eq ( event . fullDocumentBeforeChange . annotate , expEvent . prevAnnotate , event ) ; } } ) ; }
Verifies that the change streams cursor sees the required events.
Verifies that the change streams cursor sees the required events .