diff --git a/lucene/src/test/org/apache/lucene/search/TestSearchWithThreads.java b/lucene/src/test/org/apache/lucene/search/TestSearchWithThreads.java index 97d6e86aa56..0adba6edf49 100644 --- a/lucene/src/test/org/apache/lucene/search/TestSearchWithThreads.java +++ b/lucene/src/test/org/apache/lucene/search/TestSearchWithThreads.java @@ -66,11 +66,10 @@ public class TestSearchWithThreads extends LuceneTestCase { final IndexSearcher s = new IndexSearcher(r); final AtomicBoolean failed = new AtomicBoolean(); - final long stopAt = System.currentTimeMillis() + RUN_TIME_MSEC; final AtomicLong netSearch = new AtomicLong(); Thread[] threads = new Thread[NUM_SEARCH_THREADS]; - for(int threadID=0;threadID 0); + assertTrue(totSearch > 0 && totHits > 0); netSearch.addAndGet(totSearch); } catch (Exception exc) { failed.set(true); @@ -94,12 +94,16 @@ public class TestSearchWithThreads extends LuceneTestCase { } }; threads[threadID].setDaemon(true); - threads[threadID].start(); } - for(int threadID=0;threadID