jstests/replsets/tenant_migration_donor_interrupt_on_stepdown_and_shutdown.js
/**
 * Asserts the command either succeeded or failed with a NotPrimary or shutdown or network error.
 */
Asserts the command either succeeded or failed with a NotPrimary or shutdown or network error.
Asserts the command either succeeded or failed with a NotPrimary or shutdown or network error .
function assertCmdSucceededOrInterruptedDueToShutDown(cmdThread) {
    const res = cmdThread.returnData();
    try {
        assert(res.ok || res.code === ErrorCodes.TenantMigrationCommitted ||
                   ErrorCodes.isNotPrimaryError(res.code) || ErrorCodes.isShutdownError(res.code),
               res);
    } catch (e) {
        if (isNetworkError(e)) {
            jsTestLog(`Ignoring network error due to node shutting down ${tojson(e)}`);
        } else {
            throw e;
        }
    }
}
function assertCmdSucceededOrInterruptedDueToShutDown ( cmdThread ) { const res = cmdThread . returnData ( ) ; try { assert ( res . ok || res . code === ErrorCodes . TenantMigrationCommitted || ErrorCodes . isNotPrimaryError ( res . code ) || ErrorCodes . isShutdownError ( res . code ) , res ) ; } catch ( e ) { if ( isNetworkError ( e ) ) { jsTestLog ( ` ${ tojson ( e ) } ` ) ; } else { throw e ; } } }
Asserts the command either succeeded or failed with a NotPrimary or shutdown or network error.
Asserts the command either succeeded or failed with a NotPrimary or shutdown or network error .