fix test bug that's hiding another failure

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1693107 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2015-07-28 14:59:02 +00:00
parent 65b595add4
commit c01f6b745b
1 changed files with 1 additions and 1 deletions

View File

@ -485,7 +485,7 @@ public class TestIndexFileDeleter extends LuceneTestCase {
w.addDocument(doc);
}
} catch (Throwable t) {
if (t.toString().contains("fake fail") || t.getCause().toString().contains("fake fail")) {
if (t.toString().contains("fake fail") || (t.getCause() != null && t.getCause().toString().contains("fake fail"))) {
// ok
} else {
throw t;