summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/commandtests.cpp
diff options
context:
space:
mode:
authorAndy Schwerin <schwerin@mongodb.com>2016-04-16 12:24:16 -0400
committerAndy Schwerin <schwerin@mongodb.com>2016-04-18 23:44:56 -0400
commit0ab34aa7b9c3c48ea6cf17888620fca455284d35 (patch)
tree9d592c0427229b53bdea159617f7de5d3c6ff819 /src/mongo/dbtests/commandtests.cpp
parentbdc06761206ac398af04f0a2eb482c4dca49bad8 (diff)
downloadmongo-0ab34aa7b9c3c48ea6cf17888620fca455284d35.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/commandtests.cpp')
-rw-r--r--src/mongo/dbtests/commandtests.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/mongo/dbtests/commandtests.cpp b/src/mongo/dbtests/commandtests.cpp
index c09fd1a3de1..7bde7892429 100644
--- a/src/mongo/dbtests/commandtests.cpp
+++ b/src/mongo/dbtests/commandtests.cpp
@@ -28,9 +28,10 @@
#include "mongo/platform/basic.h"
+#include "mongo/db/client.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/dbdirectclient.h"
-#include "mongo/db/operation_context_impl.h"
+#include "mongo/db/operation_context.h"
#include "mongo/dbtests/dbtests.h"
using namespace mongo;
@@ -51,7 +52,8 @@ struct Base {
return "test.fs.chunks";
}
- OperationContextImpl _txn;
+ const ServiceContext::UniqueOperationContext _txnPtr = cc().makeOperationContext();
+ OperationContext& _txn = *_txnPtr;
DBDirectClient db;
};
struct Type0 : Base {
@@ -126,7 +128,8 @@ public:
return "symbolarg";
}
- OperationContextImpl _txn;
+ const ServiceContext::UniqueOperationContext _txnPtr = cc().makeOperationContext();
+ OperationContext& _txn = *_txnPtr;
DBDirectClient db;
};