diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-06-24 15:26:18 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-06-27 09:56:58 -0400 |
commit | 8fe4426fa36587ca40a0b6c8f1c84fd9aa61e5cf (patch) | |
tree | 80441172024fa0d6e752e5766aacbbce8f706703 /src/mongo/db/exec | |
parent | b7f7d746eba8ec30d059352c811e9ac57618b3bd (diff) | |
download | mongo-8fe4426fa36587ca40a0b6c8f1c84fd9aa61e5cf.tar.gz |
SERVER-29852 Store session id and transaction number on all commands' OperationContext
Diffstat (limited to 'src/mongo/db/exec')
-rw-r--r-- | src/mongo/db/exec/queued_data_stage_test.cpp | 8 | ||||
-rw-r--r-- | src/mongo/db/exec/sort_test.cpp | 8 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/exec/queued_data_stage_test.cpp b/src/mongo/db/exec/queued_data_stage_test.cpp index 08a2a57569d..960d832777a 100644 --- a/src/mongo/db/exec/queued_data_stage_test.cpp +++ b/src/mongo/db/exec/queued_data_stage_test.cpp @@ -53,9 +53,9 @@ class QueuedDataStageTest : public unittest::Test { public: QueuedDataStageTest() { _service = stdx::make_unique<ServiceContextNoop>(); - _service.get()->setFastClockSource(stdx::make_unique<ClockSourceMock>()); - _client = _service.get()->makeClient("test"); - _opCtxNoop.reset(new OperationContextNoop(_client.get(), 0, boost::none)); + _service->setFastClockSource(stdx::make_unique<ClockSourceMock>()); + _client = _service->makeClient("test"); + _opCtxNoop = _client->makeOperationContext(); _opCtx = _opCtxNoop.get(); } @@ -72,7 +72,7 @@ private: // The OperationContextNoop must be destroyed before the UniqueClient is destroyed. std::unique_ptr<ServiceContextNoop> _service; ServiceContext::UniqueClient _client; - std::unique_ptr<OperationContextNoop> _opCtxNoop; + ServiceContext::UniqueOperationContext _opCtxNoop; }; // diff --git a/src/mongo/db/exec/sort_test.cpp b/src/mongo/db/exec/sort_test.cpp index 68a2240db7b..08f3f15580e 100644 --- a/src/mongo/db/exec/sort_test.cpp +++ b/src/mongo/db/exec/sort_test.cpp @@ -53,9 +53,9 @@ class SortStageTest : public unittest::Test { public: SortStageTest() { _service = stdx::make_unique<ServiceContextNoop>(); - _service.get()->setFastClockSource(stdx::make_unique<ClockSourceMock>()); - _client = _service.get()->makeClient("test"); - _opCtxNoop.reset(new OperationContextNoop(_client.get(), 0, boost::none)); + _service->setFastClockSource(stdx::make_unique<ClockSourceMock>()); + _client = _service->makeClient("test"); + _opCtxNoop = _client->makeOperationContext(); _opCtx = _opCtxNoop.get(); CollatorFactoryInterface::set(_service.get(), stdx::make_unique<CollatorFactoryMock>()); } @@ -163,7 +163,7 @@ private: // The UniqueClient must be destroyed before the ServiceContextNoop is destroyed. // The OperationContextNoop must be destroyed before the UniqueClient is destroyed. ServiceContext::UniqueClient _client; - std::unique_ptr<OperationContextNoop> _opCtxNoop; + ServiceContext::UniqueOperationContext _opCtxNoop; }; TEST_F(SortStageTest, SortEmptyWorkingSet) { |