Get rid of this:
if (doFail && (Thread.currentThread().getName().equals("main")
|| Thread.currentThread().getName().equals("Main Thread"))) {
Migrated from LUCENE-3437 by Dawid Weiss (@dweiss), resolved Sep 15 2011
Parent: #4502
Attachments: LUCENE-3437.patch