public void AddingContinueToNewFileAfterReopenWithCorruption() { using (var fileCollection = new InMemoryFileCollection()) { using (IKeyValueDB db = new KeyValueDB(fileCollection)) { using (var tr = db.StartTransaction()) { tr.CreateOrUpdateKeyValue(_key1, _key1); tr.Commit(); } } fileCollection.SimulateCorruptionBySetSize(20 + 16); using (IKeyValueDB db = new KeyValueDB(fileCollection)) { using (var tr = db.StartTransaction()) { Assert.Equal(0, tr.GetKeyValueCount()); tr.CreateOrUpdateKeyValue(Key2, Key2); tr.Commit(); } Console.WriteLine(db.CalcStats()); } Assert.True(2 <= fileCollection.GetCount()); } }