diff options
author | Andy Schwerin <schwerin@mongodb.com> | 2016-05-24 16:34:45 -0400 |
---|---|---|
committer | Andy Schwerin <schwerin@mongodb.com> | 2016-06-03 12:48:38 -0400 |
commit | 910e782aa5d8329c5e8b2531cf0116052e8a187e (patch) | |
tree | 8c7b17d5808ffaf4b8b9c4ff6a973e34d4b851eb /src/mongo/db/storage/sorted_data_interface_test_touch.cpp | |
parent | 0b5cbbadf49da830f20fba6e779b7278f211e394 (diff) | |
download | mongo-910e782aa5d8329c5e8b2531cf0116052e8a187e.tar.gz |
SERVER-23905 Unify lifetime management for LockState on OperationContexts into OperationContext.
This change also moves responsibility for registering OperationContexts to Clients into
ServiceContext::makeOperationContext.
Diffstat (limited to 'src/mongo/db/storage/sorted_data_interface_test_touch.cpp')
-rw-r--r-- | src/mongo/db/storage/sorted_data_interface_test_touch.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/storage/sorted_data_interface_test_touch.cpp b/src/mongo/db/storage/sorted_data_interface_test_touch.cpp index 07ec83fb9c7..a54fb010832 100644 --- a/src/mongo/db/storage/sorted_data_interface_test_touch.cpp +++ b/src/mongo/db/storage/sorted_data_interface_test_touch.cpp @@ -43,7 +43,7 @@ TEST(SortedDataInterface, TouchEmpty) { const std::unique_ptr<SortedDataInterface> sorted(harnessHelper->newSortedDataInterface(false)); { - const std::unique_ptr<OperationContext> opCtx(harnessHelper->newOperationContext()); + const ServiceContext::UniqueOperationContext opCtx(harnessHelper->newOperationContext()); Status status = sorted->touch(opCtx.get()); ASSERT(status.isOK() || status.code() == ErrorCodes::CommandNotSupported); } @@ -55,12 +55,12 @@ TEST(SortedDataInterface, TouchNonEmpty) { const std::unique_ptr<SortedDataInterface> sorted(harnessHelper->newSortedDataInterface(true)); { - const std::unique_ptr<OperationContext> opCtx(harnessHelper->newOperationContext()); + const ServiceContext::UniqueOperationContext opCtx(harnessHelper->newOperationContext()); ASSERT(sorted->isEmpty(opCtx.get())); } { - const std::unique_ptr<OperationContext> opCtx(harnessHelper->newOperationContext()); + const ServiceContext::UniqueOperationContext opCtx(harnessHelper->newOperationContext()); { WriteUnitOfWork uow(opCtx.get()); ASSERT_OK(sorted->insert(opCtx.get(), key1, loc1, false)); @@ -71,12 +71,12 @@ TEST(SortedDataInterface, TouchNonEmpty) { } { - const std::unique_ptr<OperationContext> opCtx(harnessHelper->newOperationContext()); + const ServiceContext::UniqueOperationContext opCtx(harnessHelper->newOperationContext()); ASSERT_EQUALS(3, sorted->numEntries(opCtx.get())); } { - const std::unique_ptr<OperationContext> opCtx(harnessHelper->newOperationContext()); + const ServiceContext::UniqueOperationContext opCtx(harnessHelper->newOperationContext()); // XXX does not verify the index was brought into memory // (even if supported by storage engine) Status status = sorted->touch(opCtx.get()); |