summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/repl/tenant_migration_recipient_service_test.cpp')
-rw-r--r--src/mongo/db/repl/tenant_migration_recipient_service_test.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp b/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp
index c16e6b6f2b0..202aeb1a5b7 100644
--- a/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp
+++ b/src/mongo/db/repl/tenant_migration_recipient_service_test.cpp
@@ -2050,7 +2050,14 @@ TEST_F(TenantMigrationRecipientServiceTest,
auto opCtx = makeOperationContext();
std::shared_ptr<TenantMigrationRecipientService::Instance> instance;
- // Hang before starting the oplog applier.
+ // Hang before creating the oplog applier.
+ const auto hangBeforeCreatingOplogApplier =
+ globalFailPointRegistry().find("fpAfterStartingOplogFetcherMigrationRecipientInstance");
+ hangBeforeCreatingOplogApplier->setMode(FailPoint::alwaysOn,
+ 0,
+ BSON("action"
+ << "hang"));
+ // Hang after starting the oplog applier.
const auto hangAfterStartingOplogApplier =
globalFailPointRegistry().find("fpAfterStartingOplogApplierMigrationRecipientInstance");
auto initialTimesEntered = hangAfterStartingOplogApplier->setMode(FailPoint::alwaysOn,
@@ -2145,7 +2152,8 @@ TEST_F(TenantMigrationRecipientServiceTest,
ASSERT_OK(storage->insertDocument(
opCtx.get(), oplogNss, {entry.toBSON(), opTime.getTimestamp()}, opTime.getTerm()));
}
-
+ // Move on to the next failpoint to hang after starting the oplog applier.
+ hangBeforeCreatingOplogApplier->setMode(FailPoint::off);
hangAfterStartingOplogApplier->waitForTimesEntered(initialTimesEntered + 1);
auto dataConsistentOplogEntry = makeOplogEntry(dataConsistentOpTime,