summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp')
-rw-r--r--src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp b/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp
index 3a96cd1672e..02889248639 100644
--- a/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp
+++ b/src/mongo/db/s/resharding/resharding_oplog_crud_application_test.cpp
@@ -65,6 +65,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);