mirror of https://github.com/apache/lucene.git
LUCENE-2813: only throw the mock failure into the main thread
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1045310 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
34a6968476
commit
64e19107d9
|
@ -625,14 +625,20 @@ public class TestIndexWriterDelete extends LuceneTestCase {
|
|||
MockDirectoryWrapper.Failure failure = new MockDirectoryWrapper.Failure() {
|
||||
boolean sawMaybe = false;
|
||||
boolean failed = false;
|
||||
Thread thread;
|
||||
@Override
|
||||
public MockDirectoryWrapper.Failure reset() {
|
||||
thread = Thread.currentThread();
|
||||
sawMaybe = false;
|
||||
failed = false;
|
||||
return this;
|
||||
}
|
||||
@Override
|
||||
public void eval(MockDirectoryWrapper dir) throws IOException {
|
||||
if (Thread.currentThread() != thread) {
|
||||
// don't fail during merging
|
||||
return;
|
||||
}
|
||||
if (sawMaybe && !failed) {
|
||||
boolean seen = false;
|
||||
StackTraceElement[] trace = new Exception().getStackTrace();
|
||||
|
|
Loading…
Reference in New Issue