diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2016-04-19 10:30:08 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2016-04-20 09:55:59 -0400 |
commit | 74280dd7b600c51f01e28e137a73f61fc0d0a2a2 (patch) | |
tree | 95dfe535377fe297b2098b9365a522b50f1f5c1f /src/mongo/dbtests/query_stage_tests.cpp | |
parent | 22082d01a15a589398f3db6f9357dedd1a4c73fe (diff) | |
download | mongo-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/query_stage_tests.cpp')
-rw-r--r-- | src/mongo/dbtests/query_stage_tests.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/dbtests/query_stage_tests.cpp b/src/mongo/dbtests/query_stage_tests.cpp index 3a3ff3be40e..5e3bdbb50fc 100644 --- a/src/mongo/dbtests/query_stage_tests.cpp +++ b/src/mongo/dbtests/query_stage_tests.cpp @@ -26,9 +26,12 @@ * then also delete it in the license file. */ +#include "mongo/platform/basic.h" + #include "mongo/client/dbclientcursor.h" #include "mongo/db/catalog/collection.h" #include "mongo/db/catalog/database.h" +#include "mongo/db/client.h" #include "mongo/db/db_raii.h" #include "mongo/db/dbdirectclient.h" #include "mongo/db/exec/index_scan.h" @@ -36,7 +39,6 @@ #include "mongo/db/json.h" #include "mongo/db/matcher/expression_parser.h" #include "mongo/db/matcher/extensions_callback_disallow_extensions.h" -#include "mongo/db/operation_context_impl.h" #include "mongo/db/query/plan_executor.h" #include "mongo/dbtests/dbtests.h" #include "mongo/stdx/memory.h" @@ -126,7 +128,8 @@ public: } protected: - OperationContextImpl _txn; + const ServiceContext::UniqueOperationContext _txnPtr = cc().makeOperationContext(); + OperationContext& _txn = *_txnPtr; private: DBDirectClient _client; |