diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2020-06-16 07:53:22 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-06-21 12:32:58 +0000 |
commit | 33201c068f9ec37196190be083d61f46dc83d470 (patch) | |
tree | 59a30062c8fd5ece6cecc4702c28d2d5417b5b8c /src/mongo/db/service_context_d_test_fixture.cpp | |
parent | 85707dafe1d2894505fdcf74336f93ed7a5f6636 (diff) | |
download | mongo-33201c068f9ec37196190be083d61f46dc83d470.tar.gz |
SERVER-48775 Move all Sharding unit-tests that assume a MongoD to the db/s directory
With this change there are no more references from mongo/s (which is
code common between MongoS and MongoD) and mongo/db/s (which is code
specific for MongoD only).
Diffstat (limited to 'src/mongo/db/service_context_d_test_fixture.cpp')
-rw-r--r-- | src/mongo/db/service_context_d_test_fixture.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mongo/db/service_context_d_test_fixture.cpp b/src/mongo/db/service_context_d_test_fixture.cpp index 8c0b6b8abf5..a0b8caab275 100644 --- a/src/mongo/db/service_context_d_test_fixture.cpp +++ b/src/mongo/db/service_context_d_test_fixture.cpp @@ -90,6 +90,9 @@ ServiceContextMongoDTest::ServiceContextMongoDTest(std::string engine, RepairAct IndexAccessMethodFactory::set(serviceContext, std::make_unique<IndexAccessMethodFactoryImpl>()); Collection::Factory::set(serviceContext, std::make_unique<CollectionImpl::FactoryImpl>()); IndexBuildsCoordinator::set(serviceContext, std::make_unique<IndexBuildsCoordinatorMongod>()); + CollectionShardingStateFactory::set( + getServiceContext(), + std::make_unique<CollectionShardingStateFactoryShard>(getServiceContext())); } ServiceContextMongoDTest::~ServiceContextMongoDTest() { @@ -107,14 +110,6 @@ ServiceContextMongoDTest::~ServiceContextMongoDTest() { std::swap(storageGlobalParams.repair, _stashedStorageParams.repair); } -void ServiceContextMongoDTest::setUp() { - ServiceContextTest::setUp(); - - CollectionShardingStateFactory::set( - getServiceContext(), - std::make_unique<CollectionShardingStateFactoryShard>(getServiceContext())); -} - void ServiceContextMongoDTest::tearDown() { { // Some tests set the current OperationContext but do not release it until destruction. |