summaryrefslogtreecommitdiff
path: root/src/mongo/db/service_context_d_test_fixture.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/service_context_d_test_fixture.cpp')
-rw-r--r--src/mongo/db/service_context_d_test_fixture.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/mongo/db/service_context_d_test_fixture.cpp b/src/mongo/db/service_context_d_test_fixture.cpp
index df3811421d4..d42641381e9 100644
--- a/src/mongo/db/service_context_d_test_fixture.cpp
+++ b/src/mongo/db/service_context_d_test_fixture.cpp
@@ -99,7 +99,7 @@ void ServiceContextMongoDTest::_doTest() {
}
void ServiceContextMongoDTest::_dropAllDBs(OperationContext* opCtx) {
- Database::dropAllDatabasesExceptLocal(opCtx);
+ dropAllDatabasesExceptLocal(opCtx);
Lock::GlobalWrite lk(opCtx);
AutoGetDb autoDBLocal(opCtx, "local", MODE_X);
@@ -111,11 +111,10 @@ void ServiceContextMongoDTest::_dropAllDBs(OperationContext* opCtx) {
});
}
- // Database::dropAllDatabasesExceptLocal() does not close empty databases. However the holder
- // still allocates resources to track these empty databases. These resources not released by
- // Database::dropAllDatabasesExceptLocal() will be leaked at exit unless we call
- // DatabaseHolder::closeAll.
- DatabaseHolder::getDatabaseHolder().closeAll(opCtx, "all databases dropped");
+ // dropAllDatabasesExceptLocal() does not close empty databases. However the holder still
+ // allocates resources to track these empty databases. These resources not released by
+ // dropAllDatabasesExceptLocal() will be leaked at exit unless we call DatabaseHolder::closeAll.
+ dbHolder().closeAll(opCtx, "all databases dropped");
}
} // namespace mongo