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:
Robert Muir 2014-04-29 18:07:20 +00:00
parent f5de5d01e8
commit 5fc6651fc2
2 changed files with 2 additions and 3 deletions

View File

@ -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();
}
}
}

View File

@ -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);