jstests/replsets/tenant_migration_donor_rollback_during_cloning.js
// nodes, as replication has been paused.
nodes, as replication has been paused.
nodes as replication has been paused .
function listDatabasesWhilePausedFunction(tenantId, syncSourceNode, tenantMigrationTest) {
    const dbTemp = tenantMigrationTest.tenantDB(tenantId, "tempDB");
    const donorPrimary = tenantMigrationTest.getDonorPrimary();
    const donorTemporaryColl = donorPrimary.getDB(dbTemp).getCollection('tempColl');
    jsTestLog("Inserting document into tempDB.");
    assert.commandWorked(
        donorTemporaryColl.insert([{_id: 0, a: "siberian breaks"}], {writeConcern: {w: 2}}));
    assert.eq(1, donorTemporaryColl.find().readConcern('local').itcount());
    jsTestLog("Waiting for it to reach the secondary.");
    assert.soon(() => {
        return syncSourceNode.getDB(dbTemp)
                   .getCollection('tempColl')
                   .find()
                   .readConcern('local')
                   .itcount() == 1;
    }, "Document did not replicate to secondary on time.");
}
function listDatabasesWhilePausedFunction ( tenantId , syncSourceNode , tenantMigrationTest ) { const dbTemp = tenantMigrationTest . tenantDB ( tenantId , "tempDB" ) ; const donorPrimary = tenantMigrationTest . getDonorPrimary ( ) ; const donorTemporaryColl = donorPrimary . getDB ( dbTemp ) . getCollection ( 'tempColl' ) ; jsTestLog ( "Inserting document into tempDB." ) ; assert . commandWorked ( donorTemporaryColl . insert ( [ { _id : 0 , a : "siberian breaks" } ] , { writeConcern : { w : 2 } } ) ) ; assert . eq ( 1 , donorTemporaryColl . find ( ) . readConcern ( 'local' ) . itcount ( ) ) ; jsTestLog ( "Waiting for it to reach the secondary." ) ; assert . soon ( ( ) => { return syncSourceNode . getDB ( dbTemp ) . getCollection ( 'tempColl' ) . find ( ) . readConcern ( 'local' ) . itcount ( ) == 1 ; } , "Document did not replicate to secondary on time." ) ; }
nodes, as replication has been paused.
nodes as replication has been paused .