Apache Lucene open-source search software
fix test bug
Michael McCandless118c79a3d65f
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.javaindex 01ce17fd6f2..dbcc755b792 100644--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java@@ -1845,6 +1845,9 @@ public class TestIndexWriterExceptions extends LuceneTestCase {iwc = new IndexWriterConfig(new MockAnalyzer(random()));try {iw = new IndexWriter(dir, iwc);+ } catch (AssertionError ex) {+ // This is fine: we tripped IW's assert that all files it's about to fsync do exist:+ assertTrue(ex.getMessage().matches("file .* does not exist; files=\\[.*\\]"));} catch (CorruptIndexException ex) {// Exceptions are fine - we are running out of file handlers herecontinue;