summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdityavardhan Agrawal <aa729@cornell.edu>2022-09-27 15:44:43 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-09-27 16:13:10 +0000
commit2371fd2f3f37c26ba1b0d83db0f7f716042df2f6 (patch)
tree3a47d1fb8d9f08897a298b0f4708f80493603557
parentd9396d167a6ceb8f43b0b9ac017e562c89bc236a (diff)
downloadmongo-2371fd2f3f37c26ba1b0d83db0f7f716042df2f6.tar.gz
SERVER-67324: wrap replSetSetup cmd in assert.soon
-rw-r--r--jstests/replsets/tenant_migration_recipient_access_blocker_rollback.js10
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();