diff options
Diffstat (limited to 'src/mongo/db/service_context_d_test_fixture.cpp')
-rw-r--r-- | src/mongo/db/service_context_d_test_fixture.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mongo/db/service_context_d_test_fixture.cpp b/src/mongo/db/service_context_d_test_fixture.cpp index b281cc8994e..a588a708ca5 100644 --- a/src/mongo/db/service_context_d_test_fixture.cpp +++ b/src/mongo/db/service_context_d_test_fixture.cpp @@ -32,13 +32,13 @@ #include "mongo/base/checked_cast.h" #include "mongo/db/catalog/database.h" +#include "mongo/db/client.h" #include "mongo/db/concurrency/write_conflict_exception.h" #include "mongo/db/curop.h" #include "mongo/db/db_raii.h" -#include "mongo/db/operation_context_impl.h" #include "mongo/db/operation_context.h" -#include "mongo/db/service_context_d.h" #include "mongo/db/service_context.h" +#include "mongo/db/service_context_d.h" #include "mongo/db/storage/storage_options.h" #include "mongo/unittest/temp_dir.h" @@ -63,19 +63,19 @@ void ServiceContextMongoDTest::tearDown() { } void ServiceContextMongoDTest::_dropAllDBs() { - OperationContextImpl txn; - dropAllDatabasesExceptLocal(&txn); + const auto txn = cc().makeOperationContext(); + dropAllDatabasesExceptLocal(txn.get()); - ScopedTransaction transaction(&txn, MODE_X); - Lock::GlobalWrite lk(txn.lockState()); - AutoGetDb autoDBLocal(&txn, "local", MODE_X); + ScopedTransaction transaction(txn.get(), MODE_X); + Lock::GlobalWrite lk(txn->lockState()); + AutoGetDb autoDBLocal(txn.get(), "local", MODE_X); const auto localDB = autoDBLocal.getDb(); if (localDB) { MONGO_WRITE_CONFLICT_RETRY_LOOP_BEGIN { // Do not wrap in a WriteUnitOfWork until SERVER-17103 is addressed. - autoDBLocal.getDb()->dropDatabase(&txn, localDB); + autoDBLocal.getDb()->dropDatabase(txn.get(), localDB); } - MONGO_WRITE_CONFLICT_RETRY_LOOP_END(&txn, "_dropAllDBs", "local"); + MONGO_WRITE_CONFLICT_RETRY_LOOP_END(txn.get(), "_dropAllDBs", "local"); } } |