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_dupkeycheck.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_dupkeycheck.cpp')
-rw-r--r-- | src/mongo/db/storage/sorted_data_interface_test_dupkeycheck.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/db/storage/sorted_data_interface_test_dupkeycheck.cpp b/src/mongo/db/storage/sorted_data_interface_test_dupkeycheck.cpp index 359f80e9950..b160ae9b56e 100644 --- a/src/mongo/db/storage/sorted_data_interface_test_dupkeycheck.cpp +++ b/src/mongo/db/storage/sorted_data_interface_test_dupkeycheck.cpp @@ -40,7 +40,7 @@ namespace mongo { // pair that was inserted, it should still return an OK status. TEST( SortedDataInterface, DupKeyCheckAfterInsert ) { scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() ); - scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() ); + scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( true ) ); { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); @@ -76,7 +76,7 @@ namespace mongo { // not exist in the index. TEST( SortedDataInterface, DupKeyCheckEmpty ) { scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() ); - scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() ); + scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( true ) ); { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); @@ -97,7 +97,7 @@ namespace mongo { // when the insert key is located at a DiskLoc that comes after the one specified. TEST( SortedDataInterface, DupKeyCheckWhenDiskLocBefore ) { scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() ); - scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() ); + scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( true ) ); { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); @@ -108,7 +108,7 @@ 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(), key1, loc1, true ) ); uow.commit(); } } @@ -132,7 +132,7 @@ namespace mongo { // when the insert key is located at a DiskLoc that comes before the one specified. TEST( SortedDataInterface, DupKeyCheckWhenDiskLocAfter ) { scoped_ptr<HarnessHelper> harnessHelper( newHarnessHelper() ); - scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface() ); + scoped_ptr<SortedDataInterface> sorted( harnessHelper->newSortedDataInterface( true ) ); { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); @@ -143,7 +143,7 @@ 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(), key1, loc1, true ) ); uow.commit(); } } |