@ -2664,23 +2664,24 @@ TEST(DBTest, TransactionLogIteratorMoveOverZeroFiles) {
auto iter = OpenTransactionLogIter ( 0 ) ;
ExpectRecords ( 2 , iter ) ;
}
TEST ( DBTest , TransactionLogIteratorStallAtLastRecord ) {
Options options = OptionsForLogIterTest ( ) ;
DestroyAndReopen ( & options ) ;
Put ( " key1 " , DummyString ( 1024 ) ) ;
auto iter = OpenTransactionLogIter ( 0 ) ;
ASSERT_OK ( iter - > status ( ) ) ;
ASSERT_TRUE ( iter - > Valid ( ) ) ;
iter - > Next ( ) ;
ASSERT_TRUE ( ! iter - > Valid ( ) ) ;
ASSERT_OK ( iter - > status ( ) ) ;
Put ( " key2 " , DummyString ( 1024 ) ) ;
iter - > Next ( ) ;
ASSERT_OK ( iter - > status ( ) ) ;
ASSERT_TRUE ( iter - > Valid ( ) ) ;
}
// Disabled currently as does not work with mmaped files.
//
// TEST(DBTest, TransactionLogIteratorStallAtLastRecord) {
// Options options = OptionsForLogIterTest();
// DestroyAndReopen(&options);
// Put("key1", DummyString(1024));
// auto iter = OpenTransactionLogIter(0);
// ASSERT_OK(iter->status());
// ASSERT_TRUE(iter->Valid());
// iter->Next();
// ASSERT_TRUE(!iter->Valid());
// ASSERT_OK(iter->status());
// Put("key2", DummyString(1024));
// iter->Next();
// ASSERT_OK(iter->status());
// ASSERT_TRUE(iter->Valid());
// }
//
TEST ( DBTest , ReadCompaction ) {
std : : string value ( 4096 , ' 4 ' ) ; // a string of size 4K
{