From 2371fd2f3f37c26ba1b0d83db0f7f716042df2f6 Mon Sep 17 00:00:00 2001 From: Adityavardhan Agrawal Date: Tue, 27 Sep 2022 15:44:43 +0000 Subject: SERVER-67324: wrap replSetSetup cmd in assert.soon --- .../tenant_migration_recipient_access_blocker_rollback.js | 10 +++++----- 1 file 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(); -- cgit v1.2.1