mirror of https://github.com/apache/lucene.git
fix test bug
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1718543 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
92b659ab9e
commit
118c79a3d6
|
@ -1845,6 +1845,9 @@ public class TestIndexWriterExceptions extends LuceneTestCase {
|
||||||
iwc = new IndexWriterConfig(new MockAnalyzer(random()));
|
iwc = new IndexWriterConfig(new MockAnalyzer(random()));
|
||||||
try {
|
try {
|
||||||
iw = new IndexWriter(dir, iwc);
|
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) {
|
} catch (CorruptIndexException ex) {
|
||||||
// Exceptions are fine - we are running out of file handlers here
|
// Exceptions are fine - we are running out of file handlers here
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue