Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

fix test bug that's hiding another failure

Michael McCandlessc01f6b745b8a
diff --git a/lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java b/lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java
index ccc87d7e816..5fa777b3740 100644
--- a/lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java
+++ b/lucene/core/src/test/org/apache/lucene/index/TestIndexFileDeleter.java
@@ -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;