summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/dbhelper_tests.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2016-04-19 10:30:08 -0400
committerAndy Schwerin <schwerin@mongodb.com>2016-04-20 09:55:59 -0400
commit74280dd7b600c51f01e28e137a73f61fc0d0a2a2 (patch)
tree95dfe535377fe297b2098b9365a522b50f1f5c1f /src/mongo/dbtests/dbhelper_tests.cpp
parent22082d01a15a589398f3db6f9357dedd1a4c73fe (diff)
downloadmongo-74280dd7b600c51f01e28e137a73f61fc0d0a2a2.tar.gz
SERVER-23779 Replace direct instantiation of OperationContextImpl with cc().makeOperationContext().
Also, make OperationContextImpl's constructor private so that it can only be constructed via a Client.
Diffstat (limited to 'src/mongo/dbtests/dbhelper_tests.cpp')
-rw-r--r--src/mongo/dbtests/dbhelper_tests.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/dbtests/dbhelper_tests.cpp b/src/mongo/dbtests/dbhelper_tests.cpp
index 8d7909eac65..aee6a0f406a 100644
--- a/src/mongo/dbtests/dbhelper_tests.cpp
+++ b/src/mongo/dbtests/dbhelper_tests.cpp
@@ -31,10 +31,10 @@
#include "mongo/client/dbclientcursor.h"
#include "mongo/db/catalog/collection.h"
#include "mongo/db/catalog/database_holder.h"
+#include "mongo/db/client.h"
#include "mongo/db/db_raii.h"
#include "mongo/db/dbdirectclient.h"
#include "mongo/db/dbhelpers.h"
-#include "mongo/db/operation_context_impl.h"
#include "mongo/db/range_arithmetic.h"
#include "mongo/db/write_concern_options.h"
#include "mongo/dbtests/dbtests.h"
@@ -58,7 +58,8 @@ public:
RemoveRange() : _min(4), _max(8) {}
void run() {
- OperationContextImpl txn;
+ const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext();
+ OperationContext& txn = *txnPtr;
DBDirectClient client(&txn);
for (int i = 0; i < 10; ++i) {