summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp')
-rw-r--r--src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp
index c437eb3ec05..c72b4a2122a 100644
--- a/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp
+++ b/src/mongo/db/s/resharding/resharding_oplog_batch_applier_test.cpp
@@ -73,6 +73,10 @@ public:
ServiceContextMongoDTest::setUp();
auto serviceContext = getServiceContext();
+
+ // Initialize sharding components as a shard server.
+ serverGlobalParams.clusterRole = ClusterRole::ShardServer;
+
{
auto opCtx = makeOperationContext();
auto replCoord = std::make_unique<repl::ReplicationCoordinatorMock>(serviceContext);