diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2016-04-16 12:24:16 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2016-04-18 23:44:56 -0400 |
commit | 0ab34aa7b9c3c48ea6cf17888620fca455284d35 (patch) | |
tree | 9d592c0427229b53bdea159617f7de5d3c6ff819 /src/mongo/dbtests/pdfiletests.cpp | |
parent | bdc06761206ac398af04f0a2eb482c4dca49bad8 (diff) | |
download | mongo-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/pdfiletests.cpp')
-rw-r--r-- | src/mongo/dbtests/pdfiletests.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/dbtests/pdfiletests.cpp b/src/mongo/dbtests/pdfiletests.cpp index f4955d67edd..943f0a124fd 100644 --- a/src/mongo/dbtests/pdfiletests.cpp +++ b/src/mongo/dbtests/pdfiletests.cpp @@ -32,10 +32,10 @@ #include "mongo/platform/basic.h" #include "mongo/db/catalog/collection.h" +#include "mongo/db/client.h" #include "mongo/db/db.h" #include "mongo/db/db_raii.h" #include "mongo/db/json.h" -#include "mongo/db/operation_context_impl.h" #include "mongo/db/ops/insert.h" #include "mongo/dbtests/dbtests.h" @@ -62,7 +62,8 @@ protected: return _context.db()->getCollection(ns()); } - OperationContextImpl _txn; + const ServiceContext::UniqueOperationContext _txnPtr = cc().makeOperationContext(); + OperationContext& _txn = *_txnPtr; ScopedTransaction _scopedXact; Lock::GlobalWrite _lk; OldClientContext _context; |