diff options
Diffstat (limited to 'src/mongo/db/s/global_index/global_index_cloning_service_test.cpp')
-rw-r--r-- | src/mongo/db/s/global_index/global_index_cloning_service_test.cpp | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/mongo/db/s/global_index/global_index_cloning_service_test.cpp b/src/mongo/db/s/global_index/global_index_cloning_service_test.cpp index 98c6adeacd5..950584faa94 100644 --- a/src/mongo/db/s/global_index/global_index_cloning_service_test.cpp +++ b/src/mongo/db/s/global_index/global_index_cloning_service_test.cpp @@ -318,7 +318,6 @@ private: const std::string _indexName{"global_x_1"}; const StringData _indexKey{"x"}; const BSONObj _indexSpec{BSON("key" << BSON(_indexKey << 1) << "unique" << true)}; - const RAIIServerParameterControllerForTest _enableFeature{"featureFlagGlobalIndexes", true}; ReadWriteConcernDefaultsLookupMock _lookupMock; std::shared_ptr<StateTransitionController> _stateTransitionController; @@ -327,6 +326,15 @@ private: MockGlobalIndexClonerFetcher _fetcherCopyForVerification; }; +MONGO_INITIALIZER_GENERAL(EnableFeatureFlagGlobalIndexes, + ("EndServerParameterRegistration"), + ("default")) +(InitializerContext*) { + auto* param = ServerParameterSet::getNodeParameterSet()->get("featureFlagGlobalIndexes"); + uassertStatusOK( + param->set(BSON("featureFlagGlobalIndexes" << true).firstElement(), boost::none)); +} + TEST_F(GlobalIndexClonerServiceTest, CloneInsertsToGlobalIndexCollection) { auto doc = makeStateDocument(); auto opCtx = makeOperationContext(); |