diff options
author | Dan Pasette <dan@10mongodb.com> | 2014-11-21 08:08:55 -0500 |
---|---|---|
committer | Dan Pasette <dan@mongodb.com> | 2014-11-21 08:08:55 -0500 |
commit | 534263f1d83cdeb142c27f0ea5a1ecffc5b7526a (patch) | |
tree | cfc55d07f3740328598853b038fd8fece389d9aa | |
parent | 59487e24591a505acb8eb03d5c5d0652098e0841 (diff) | |
download | mongo-534263f1d83cdeb142c27f0ea5a1ecffc5b7526a.tar.gz |
SERVER-16248 fix unit test for getIteratorForRepair
-rw-r--r-- | src/mongo/db/storage/record_store_test_repairiter.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/mongo/db/storage/record_store_test_repairiter.cpp b/src/mongo/db/storage/record_store_test_repairiter.cpp index ee632bbce71..61ff02cc789 100644 --- a/src/mongo/db/storage/record_store_test_repairiter.cpp +++ b/src/mongo/db/storage/record_store_test_repairiter.cpp @@ -55,6 +55,10 @@ namespace mongo { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); RecordIterator *it = rs->getIteratorForRepair( opCtx.get() ); + // returns NULL if getIteratorForRepair is not supported + if (it == NULL) { + return; + } ASSERT( it->isEOF() ); ASSERT_EQUALS( DiskLoc(), it->curr() ); ASSERT_EQUALS( DiskLoc(), it->getNext() ); @@ -105,6 +109,10 @@ namespace mongo { { scoped_ptr<OperationContext> opCtx( harnessHelper->newOperationContext() ); RecordIterator *it = rs->getIteratorForRepair( opCtx.get() ); + // returns NULL if getIteratorForRepair is not supported + if (it == NULL) { + return; + } while ( !it->isEOF() ) { DiskLoc loc = it->getNext(); |