diff options
author | Jason Chan <jason.chan@mongodb.com> | 2021-06-14 14:08:11 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-16 14:42:39 +0000 |
commit | eefac1b7c9b5e1f4f97fae1fcc5f72ed2816b7eb (patch) | |
tree | 50baa620d807509327a971383b5ddf37595c674a | |
parent | ace1746cc2640d5c862d9c7a4db7acd0c25eb75a (diff) | |
download | mongo-eefac1b7c9b5e1f4f97fae1fcc5f72ed2816b7eb.tar.gz |
SERVER-57658 tenant_migration_donor_initial_sync_recovery.js should not always expect for the migration to be committed
(cherry picked from commit f28b72d3f7800a68a7c1ce0b64e3dfc71978029e)
-rw-r--r-- | jstests/replsets/tenant_migration_donor_initial_sync_recovery.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/jstests/replsets/tenant_migration_donor_initial_sync_recovery.js b/jstests/replsets/tenant_migration_donor_initial_sync_recovery.js index 2765df9d5f6..09a5571e5d5 100644 --- a/jstests/replsets/tenant_migration_donor_initial_sync_recovery.js +++ b/jstests/replsets/tenant_migration_donor_initial_sync_recovery.js @@ -69,6 +69,9 @@ donorRst.waitForState(initialSyncNode, ReplSetTest.State.STARTUP_2); // the various migration states. hangInDonorAfterReplicatingKeys.off(); sleep(Math.random() * kMaxSleepTimeMS); +if (fp) { + fp.wait(); +} jsTestLog("Waiting for initial sync to finish: " + initialSyncNode.port); initialSyncNode.getDB('admin').adminCommand( @@ -143,7 +146,13 @@ if (fp) { restartServerReplication(initialSyncNode); -TenantMigrationTest.assertCommitted(tenantMigrationTest.waitForMigrationToComplete(migrationOpts)); +if (kMigrationFpNames[index] === "abortTenantMigrationBeforeLeavingBlockingState") { + TenantMigrationTest.assertAborted( + tenantMigrationTest.waitForMigrationToComplete(migrationOpts)); +} else { + TenantMigrationTest.assertCommitted( + tenantMigrationTest.waitForMigrationToComplete(migrationOpts)); +} assert.commandWorked(tenantMigrationTest.forgetMigration(migrationOpts.migrationIdString)); tenantMigrationTest.stop(); })(); |