jstests/libs/write_concern_util.js
// Stops replication on the given server(s).
Stops replication on the given server(s).
Stops replication on the given server ( s ) .
function stopServerReplication(conn, retryIntervalMS) {
    retryIntervalMS = retryIntervalMS || 300;
    if (conn.length) {
        conn.forEach(function(n) {
            stopServerReplication(n);
        });
        return;
    }
    const stopReplProducerFailPoint = configureFailPoint(conn, 'stopReplProducer');
    if (assert.commandWorked(conn.adminCommand('replSetGetStatus')).myState !=
        ReplSetTest.State.PRIMARY) {
        stopReplProducerFailPoint.wait();
    }
}
function stopServerReplication ( conn , retryIntervalMS ) { retryIntervalMS = retryIntervalMS || 300 ; if ( conn . length ) { conn . forEach ( function ( n ) { stopServerReplication ( n ) ; } ) ; return ; } const stopReplProducerFailPoint = configureFailPoint ( conn , 'stopReplProducer' ) ; if ( assert . commandWorked ( conn . adminCommand ( 'replSetGetStatus' ) ) . myState != ReplSetTest . State . PRIMARY ) { stopReplProducerFailPoint . wait ( ) ; } }
Stops replication on the given server(s).
Stops replication on the given server ( s ) .
// Wait until the fail point is actually hit. Don't wait if the node is the primary, because // the fail point won't be hit until the node transitions from being the primary.