mirror of
https://github.com/apache/lucene.git
synced 2025-03-03 23:09:36 +00:00
fix test bug
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1433177 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
9050df8046
commit
a795b5ab17
@ -354,16 +354,20 @@ public class TestIndexWriterWithThreads extends LuceneTestCase {
|
||||
StackTraceElement[] trace = new Exception().getStackTrace();
|
||||
boolean sawAbortOrFlushDoc = false;
|
||||
boolean sawClose = false;
|
||||
boolean sawMerge = false;
|
||||
for (int i = 0; i < trace.length; i++) {
|
||||
if ("abort".equals(trace[i].getMethodName()) ||
|
||||
"finishDocument".equals(trace[i].getMethodName())) {
|
||||
sawAbortOrFlushDoc = true;
|
||||
}
|
||||
if ("merge".equals(trace[i])) {
|
||||
sawMerge = true;
|
||||
}
|
||||
if ("close".equals(trace[i].getMethodName())) {
|
||||
sawClose = true;
|
||||
}
|
||||
}
|
||||
if (sawAbortOrFlushDoc && !sawClose) {
|
||||
if (sawAbortOrFlushDoc && !sawClose && !sawMerge) {
|
||||
if (onlyOnce)
|
||||
doFail = false;
|
||||
//System.out.println(Thread.currentThread().getName() + ": now fail");
|
||||
|
Loading…
x
Reference in New Issue
Block a user