summaryrefslogtreecommitdiff
path: root/src/mongo/dbtests/threadedtests.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/threadedtests.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/threadedtests.cpp')
-rw-r--r--src/mongo/dbtests/threadedtests.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/dbtests/threadedtests.cpp b/src/mongo/dbtests/threadedtests.cpp
index 1ad45c337bf..943bfffed15 100644
--- a/src/mongo/dbtests/threadedtests.cpp
+++ b/src/mongo/dbtests/threadedtests.cpp
@@ -41,16 +41,15 @@
#include "mongo/db/client.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/concurrency/lock_state.h"
-#include "mongo/db/operation_context_impl.h"
#include "mongo/dbtests/dbtests.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/platform/bits.h"
#include "mongo/stdx/functional.h"
#include "mongo/stdx/thread.h"
#include "mongo/util/concurrency/old_thread_pool.h"
+#include "mongo/util/concurrency/old_thread_pool.h"
#include "mongo/util/concurrency/rwlock.h"
#include "mongo/util/concurrency/synchronization.h"
-#include "mongo/util/concurrency/old_thread_pool.h"
#include "mongo/util/concurrency/ticketholder.h"
#include "mongo/util/log.h"
#include "mongo/util/timer.h"
@@ -119,7 +118,8 @@ private:
virtual void subthread(int tnumber) {
Client::initThread("mongomutextest");
- OperationContextImpl txn;
+ const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext();
+ OperationContext& txn = *txnPtr;
sleepmillis(0);
for (int i = 0; i < N; i++) {