diff options
Diffstat (limited to 'jstests/replsets/tenant_migration_recipient_access_blocker_rollback.js')
-rw-r--r-- | jstests/replsets/tenant_migration_recipient_access_blocker_rollback.js | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/jstests/replsets/tenant_migration_recipient_access_blocker_rollback.js b/jstests/replsets/tenant_migration_recipient_access_blocker_rollback.js index 36704560793..816ea76b9f2 100644 --- a/jstests/replsets/tenant_migration_recipient_access_blocker_rollback.js +++ b/jstests/replsets/tenant_migration_recipient_access_blocker_rollback.js @@ -88,14 +88,14 @@ function runRollbackAfterMigrationCommitted(tenantId) { // Stepping up one of the secondaries should cause the original primary to rollback. jsTestLog("Stepping up one of the secondaries."); const newRecipientPrimary = secondaries[0]; - assert.commandWorked(newRecipientPrimary.adminCommand({replSetStepUp: 1})); + recipientRst.stepUp(newRecipientPrimary, {awaitReplicationBeforeStepUp: false}); jsTestLog("Restarting server replication."); restartServerReplication(secondaries); recipientRst.awaitReplication(); jsTestLog("Stepping up the original primary back to primary."); - assert.commandWorked(originalPrimary.adminCommand({replSetStepUp: 1})); + recipientRst.stepUp(originalPrimary, {awaitReplicationBeforeStepUp: false}); jsTestLog("Perform a read against the original primary on the tenant collection."); assert.eq(numDocs, originalPrimary.getDB(dbName)[collName].find().itcount()); @@ -187,7 +187,7 @@ function runRollbackAfterLoneRecipientForgetMigrationCommand(tenantId) { // Stepping up one of the secondaries should cause the original primary to rollback. jsTestLog("Stepping up one of the secondaries."); - assert.commandWorked(newPrimary.adminCommand({replSetStepUp: 1})); + recipientRst.stepUp(newPrimary, {awaitReplicationBeforeStepUp: false}); assert.commandFailedWithCode(recipientForgetMigrationThread.returnData(), ErrorCodes.InterruptedDueToReplStateChange); @@ -202,13 +202,13 @@ function runRollbackAfterLoneRecipientForgetMigrationCommand(tenantId) { jsTestLog("Stepping up the original primary back to primary."); const fpOriginalPrimaryBeforeStarting = configureFailPoint(originalPrimary, "pauseBeforeRunTenantMigrationRecipientInstance"); - assert.commandWorked(originalPrimary.adminCommand({replSetStepUp: 1})); + fpOriginalPrimary.off(); + recipientRst.stepUp(originalPrimary, {awaitReplicationBeforeStepUp: false}); jsTestLog("Perform another read against the original primary on the tenant collection."); assert.eq(1, originalPrimary.getDB(dbName)[collName].find().itcount()); fpOriginalPrimaryBeforeStarting.off(); - fpOriginalPrimary.off(); fpNewPrimary.off(); tenantMigrationTest.stop(); |