diff options
Diffstat (limited to 'src/mongo/db/storage/record_store_test_harness.cpp')
-rw-r--r-- | src/mongo/db/storage/record_store_test_harness.cpp | 19 |
1 files changed, 3 insertions, 16 deletions
diff --git a/src/mongo/db/storage/record_store_test_harness.cpp b/src/mongo/db/storage/record_store_test_harness.cpp index 8fc234ab9cd..95fd4c993b0 100644 --- a/src/mongo/db/storage/record_store_test_harness.cpp +++ b/src/mongo/db/storage/record_store_test_harness.cpp @@ -257,23 +257,10 @@ TEST(RecordStoreTestHarness, Update1) { unique_ptr<OperationContext> opCtx(harnessHelper->newOperationContext()); { WriteUnitOfWork uow(opCtx.get()); - Status status = + StatusWith<RecordId> res = rs->updateRecord(opCtx.get(), loc, s2.c_str(), s2.size() + 1, false, NULL); - - if (ErrorCodes::NeedsDocumentMove == status) { - // NeedsDocumentMove should only be possible under MMAPv1. We don't have the means - // to check storageEngine here but asserting 'supportsDocLocking()' is false - // provides an equivalent check as only MMAPv1 will/should return false. - ASSERT_FALSE(harnessHelper->supportsDocLocking()); - StatusWith<RecordId> newLocation = - rs->insertRecord(opCtx.get(), s2.c_str(), s2.size() + 1, false); - ASSERT_OK(newLocation.getStatus()); - rs->deleteRecord(opCtx.get(), loc); - loc = newLocation.getValue(); - } else { - ASSERT_OK(status); - } - + ASSERT_OK(res.getStatus()); + loc = res.getValue(); uow.commit(); } } |