private void Crash(IndexWriter writer) { MockRAMDirectory dir = (MockRAMDirectory)writer.GetDirectory(); ConcurrentMergeScheduler cms = (ConcurrentMergeScheduler)writer.GetMergeScheduler(); dir.Crash(); cms.Sync(); dir.ClearCrash(); }