mirror of
https://github.com/apache/lucene.git
synced 2025-03-04 07:19:18 +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();
|
StackTraceElement[] trace = new Exception().getStackTrace();
|
||||||
boolean sawAbortOrFlushDoc = false;
|
boolean sawAbortOrFlushDoc = false;
|
||||||
boolean sawClose = false;
|
boolean sawClose = false;
|
||||||
|
boolean sawMerge = false;
|
||||||
for (int i = 0; i < trace.length; i++) {
|
for (int i = 0; i < trace.length; i++) {
|
||||||
if ("abort".equals(trace[i].getMethodName()) ||
|
if ("abort".equals(trace[i].getMethodName()) ||
|
||||||
"finishDocument".equals(trace[i].getMethodName())) {
|
"finishDocument".equals(trace[i].getMethodName())) {
|
||||||
sawAbortOrFlushDoc = true;
|
sawAbortOrFlushDoc = true;
|
||||||
}
|
}
|
||||||
|
if ("merge".equals(trace[i])) {
|
||||||
|
sawMerge = true;
|
||||||
|
}
|
||||||
if ("close".equals(trace[i].getMethodName())) {
|
if ("close".equals(trace[i].getMethodName())) {
|
||||||
sawClose = true;
|
sawClose = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (sawAbortOrFlushDoc && !sawClose) {
|
if (sawAbortOrFlushDoc && !sawClose && !sawMerge) {
|
||||||
if (onlyOnce)
|
if (onlyOnce)
|
||||||
doFail = false;
|
doFail = false;
|
||||||
//System.out.println(Thread.currentThread().getName() + ": now fail");
|
//System.out.println(Thread.currentThread().getName() + ": now fail");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user