mirror of https://github.com/apache/lucene.git
LUCENE-3661: generalize from bitvector->livedocs
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/branches/lucene3661@1233532 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
2227b6e668
commit
c2ad31a702
|
@ -20,6 +20,7 @@ package org.apache.lucene.index;
|
|||
import java.io.IOException;
|
||||
|
||||
import org.apache.lucene.analysis.MockAnalyzer;
|
||||
import org.apache.lucene.codecs.LiveDocsFormat;
|
||||
import org.apache.lucene.document.Document;
|
||||
import org.apache.lucene.document.FieldType;
|
||||
import org.apache.lucene.document.TextField;
|
||||
|
@ -453,13 +454,13 @@ public class TestIndexWriterOnDiskFull extends LuceneTestCase {
|
|||
}
|
||||
StackTraceElement[] trace = new Exception().getStackTrace();
|
||||
for (int i = 0; i < trace.length; i++) {
|
||||
if ("org.apache.lucene.index.SegmentMerger".equals(trace[i].getClassName()) && "mergeTerms".equals(trace[i].getMethodName()) && !didFail1) {
|
||||
if (SegmentMerger.class.getName().equals(trace[i].getClassName()) && "mergeTerms".equals(trace[i].getMethodName()) && !didFail1) {
|
||||
didFail1 = true;
|
||||
throw new IOException("fake disk full during mergeTerms");
|
||||
}
|
||||
if ("org.apache.lucene.util.BitVector".equals(trace[i].getClassName()) && "write".equals(trace[i].getMethodName()) && !didFail2) {
|
||||
if (LiveDocsFormat.class.getName().equals(trace[i].getClassName()) && "writeLiveDocs".equals(trace[i].getMethodName()) && !didFail2) {
|
||||
didFail2 = true;
|
||||
throw new IOException("fake disk full while writing BitVector");
|
||||
throw new IOException("fake disk full while writing LiveDocs");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue