mirror of https://github.com/apache/lucene.git
fix test to actually throw exception
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1591038 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
f5de5d01e8
commit
5fc6651fc2
|
@ -317,14 +317,13 @@ final class DefaultIndexingChain extends DocConsumer {
|
|||
indexDocValue(fp, dvType, field);
|
||||
}
|
||||
}
|
||||
storedFieldsWriter.finishDocument();
|
||||
success = true;
|
||||
} finally {
|
||||
if (success == false) {
|
||||
// We must abort, on the possibility that the
|
||||
// stored fields file is now corrupt:
|
||||
docWriter.setAborting();
|
||||
} else {
|
||||
storedFieldsWriter.finishDocument();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -427,7 +427,7 @@ public class TestIndexWriterWithThreads extends LuceneTestCase {
|
|||
if (doFail) {
|
||||
StackTraceElement[] trace = new Exception().getStackTrace();
|
||||
for (int i = 0; i < trace.length; i++) {
|
||||
if ("flush".equals(trace[i].getMethodName()) && "org.apache.lucene.index.DocFieldProcessor".equals(trace[i].getClassName())) {
|
||||
if ("flush".equals(trace[i].getMethodName()) && DefaultIndexingChain.class.getName().equals(trace[i].getClassName())) {
|
||||
if (onlyOnce)
|
||||
doFail = false;
|
||||
//System.out.println(Thread.currentThread().getName() + ": NOW FAIL: onlyOnce=" + onlyOnce);
|
||||
|
|
Loading…
Reference in New Issue