diff options
author | Eliot Horowitz <eliot@10gen.com> | 2014-10-16 09:08:28 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2014-10-16 17:56:42 -0400 |
commit | 34cfe32ab4c0751ceb55b607c05dc593c3dd901c (patch) | |
tree | 708e7fa2ba33df6a195bbae6d957308c07bbf28d /src/mongo/db/storage/sorted_data_interface_test_rollback.cpp | |
parent | 5af2cac9e0de1bf20eba4790ecc3547c679dfd13 (diff) | |
download | mongo-34cfe32ab4c0751ceb55b607c05dc593c3dd901c.tar.gz |
SERVER-13635: pass whether an index is unique or not down through SortedDataInterface
Diffstat (limited to 'src/mongo/db/storage/sorted_data_interface_test_rollback.cpp')
-rw-r--r-- | src/mongo/db/storage/sorted_data_interface_test_rollback.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mongo/db/storage/sorted_data_interface_test_rollback.cpp b/src/mongo/db/storage/sorted_data_interface_test_rollback.cpp index b0af87362ba..0216f35f575 100644 --- a/src/mongo/db/storage/sorted_data_interface_test_rollback.cpp +++ b/src/mongo/db/storage/sorted_data_interface_test_rollback.cpp @@ -39,7 +39,7 @@ namespace mongo { // on the WriteUnitOfWork causes the changes to not become visible. TEST( SortedDataInterface, InsertWithoutCommit ) { scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() ); - scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() ); + scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( true ) ); { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); @@ -81,7 +81,7 @@ namespace mongo { // not become visible. TEST( SortedDataInterface, UnindexWithoutCommit ) { scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() ); - scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() ); + scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( false ) ); { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); @@ -92,8 +92,8 @@ namespace mongo { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); { WriteUnitOfWork uow( opCtx.get() ); - ASSERT_OK( sorted->insert( opCtx.get(), key1, loc1, false ) ); - ASSERT_OK( sorted->insert( opCtx.get(), key2, loc2, false ) ); + ASSERT_OK( sorted->insert( opCtx.get(), key1, loc1, true ) ); + ASSERT_OK( sorted->insert( opCtx.get(), key2, loc2, true ) ); uow.commit(); } } @@ -107,7 +107,7 @@ namespace mongo { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); { WriteUnitOfWork uow( opCtx.get() ); - ASSERT( sorted->unindex( opCtx.get(), key2, loc2 ) ); + ASSERT( sorted->unindex( opCtx.get(), key2, loc2, true ) ); // no commit } } @@ -121,7 +121,7 @@ namespace mongo { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); { WriteUnitOfWork uow( opCtx.get() ); - ASSERT_OK( sorted->insert( opCtx.get(), key3, loc3, false ) ); + ASSERT_OK( sorted->insert( opCtx.get(), key3, loc3, true ) ); uow.commit(); } } @@ -135,8 +135,8 @@ namespace mongo { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); { WriteUnitOfWork uow( opCtx.get() ); - ASSERT( sorted->unindex( opCtx.get(), key1, loc1 ) ); - ASSERT( sorted->unindex( opCtx.get(), key3, loc3 ) ); + ASSERT( sorted->unindex( opCtx.get(), key1, loc1, true ) ); + ASSERT( sorted->unindex( opCtx.get(), key3, loc3, true ) ); // no commit } } |