MCPcopy Create free account
hub / github.com/ElementsProject/elements / TEST

Function TEST

src/leveldb/db/corruption_test.cc:192–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

190};
191
192TEST(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
203TEST(CorruptionTest, RecoverWriteError) {
204 env_.writable_file_error_ = true;

Callers

nothing calls this directly

Calls 15

CheckFunction · 0.85
ValueFunction · 0.85
WriteOptionsClass · 0.85
RepairDBFunction · 0.85
NumberToStringFunction · 0.85
TEST_CompactMemTableMethod · 0.80
TEST_CompactRangeMethod · 0.80
OptionsClass · 0.70
KeyFunction · 0.70
ReadOptionsClass · 0.50
PutMethod · 0.45
WriteMethod · 0.45

Tested by

no test coverage detected