jstests/replsets/initial_sync_test_fixture_test.js
/**
 * Helper function to check that specific messages appeared or did not appear in the logs. If
 * the command was listIndexes and we expect the message to appear, we also add the collection
 * UUID to make sure that it corresponds to the expected collection.
 */
Helper function to check that specific messages appeared or did not appear in the logs. If
the command was listIndexes and we expect the message to appear, we also add the collection
UUID to make sure that it corresponds to the expected collection.
Helper function to check that specific messages appeared or did not appear in the logs . If the command was listIndexes and we expect the message to appear we also add the collection UUID to make sure that it corresponds to the expected collection .
function checkLogForCollectionClonerMsg(node, commandName, dbname, contains, collUUID) {
    let msg =
        "Collection Cloner scheduled a remote command on the " + dbname + " db: { " + commandName;
    if (isJsonLog(node)) {
        msg = 'Collection Cloner scheduled a remote command","attr":{"stage":"' + dbname +
            " db: { " + commandName;
    }
    if (commandName === "listIndexes" && contains) {
        msg += ": " + collUUID;
        if (isJsonLog(node)) {
            msg = msg.replace('("', '(\\"').replace('")', '\\")');
        }
    }
    checkLogForMsg(node, msg, contains);
}
function checkLogForCollectionClonerMsg ( node , commandName , dbname , contains , collUUID ) { let msg = "Collection Cloner scheduled a remote command on the " + dbname + " db: { " + commandName ; if ( isJsonLog ( node ) ) { msg = 'Collection Cloner scheduled a remote command","attr":{"stage":"' + dbname + " db: { " + commandName ; } if ( commandName === "listIndexes" && contains ) { msg += ": " + collUUID ; if ( isJsonLog ( node ) ) { msg = msg . replace ( '("' , '(\\"' ) . replace ( '")' , '\\")' ) ; } } checkLogForMsg ( node , msg , contains ) ; }
Helper function to check that specific messages appeared or did not appear in the logs.
Helper function to check that specific messages appeared or did not appear in the logs .