| 190 | }; |
| 191 | |
| 192 | TEST(CorruptionTest, Recovery) { |
| 193 | Build(100); |
| 194 | Check(100, 100); |
| 195 | Corrupt(kLogFile, 19, 1); // WriteBatch tag for first record |
| 196 | Corrupt(kLogFile, log::kBlockSize + 1000, 1); // Somewhere in second block |
| 197 | Reopen(); |
| 198 | |
| 199 | // The 64 records in the first two log blocks are completely lost. |
| 200 | Check(36, 36); |
| 201 | } |
| 202 | |
| 203 | TEST(CorruptionTest, RecoverWriteError) { |
| 204 | env_.writable_file_error_ = true; |
nothing calls this directly
no test coverage detected