From c7bd8332554c99c3bd963f586688f6327ecd5a0d Mon Sep 17 00:00:00 2001 From: Simon Willnauer Date: Tue, 28 Jun 2011 12:44:33 +0000 Subject: [PATCH] LUCENE-3253: TestIndexwriterWithThreads#testCloseWithThreads hangs if a thread hit an exception before indexing its first document git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1140574 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/lucene/index/TestIndexWriterWithThreads.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lucene/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java b/lucene/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java index 4e27c135938..dd4b30208c4 100644 --- a/lucene/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java +++ b/lucene/src/test/org/apache/lucene/index/TestIndexWriterWithThreads.java @@ -184,6 +184,8 @@ public class TestIndexWriterWithThreads extends LuceneTestCase { if (threads[i].addCount > 0) { done = true; break; + } else if (!threads[i].isAlive()) { + fail("thread failed before indexing a single document"); } }