Commit 8d9a833a authored by Mukund Sivaraman's avatar Mukund Sivaraman
Browse files

[2850] Check that the old data is still available after the corruption tests

parent 14a35130
......@@ -426,6 +426,10 @@ TEST_F(ZoneTableSegmentMappedTest, resetFailedCorruptedChecksum) {
EXPECT_THROW({
ztable_segment_->reset(ZoneTableSegment::READ_WRITE, config_params2_);
}, ResetFailed);
// Check for the old data in the segment to make sure it is still
// available and correct.
EXPECT_TRUE(verifyData(ztable_segment_->getMemorySegment()));
}
TEST_F(ZoneTableSegmentMappedTest, resetFailedMissingChecksum) {
......@@ -446,6 +450,10 @@ TEST_F(ZoneTableSegmentMappedTest, resetFailedMissingChecksum) {
EXPECT_THROW({
ztable_segment_->reset(ZoneTableSegment::READ_ONLY, config_params2_);
}, ResetFailed);
// Check for the old data in the segment to make sure it is still
// available and correct.
EXPECT_TRUE(verifyData(ztable_segment_->getMemorySegment()));
}
TEST_F(ZoneTableSegmentMappedTest, resetFailedMissingHeader) {
......@@ -466,6 +474,10 @@ TEST_F(ZoneTableSegmentMappedTest, resetFailedMissingHeader) {
EXPECT_THROW({
ztable_segment_->reset(ZoneTableSegment::READ_ONLY, config_params2_);
}, ResetFailed);
// Check for the old data in the segment to make sure it is still
// available and correct.
EXPECT_TRUE(verifyData(ztable_segment_->getMemorySegment()));
}
TEST_F(ZoneTableSegmentMappedTest, resetHeaderUninitialized) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment