fix false test failure

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1044257 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael McCandless 2010-12-10 09:52:30 +00:00
parent cdf6350cd6
commit 14f4e0475d
1 changed files with 69 additions and 60 deletions

View File

@ -48,6 +48,7 @@ import static org.junit.Assume.*;
// TODO
// - mix in optimize, addIndexes
// - randomoly mix in non-congruent docs
public class TestNRTThreads extends LuceneTestCase {
@ -216,6 +217,8 @@ public class TestNRTThreads extends LuceneTestCase {
smokeTestReader(r);
if (r.numDocs() > 0) {
final IndexSearcher s = new IndexSearcher(r);
// run search threads
@ -241,6 +244,9 @@ public class TestNRTThreads extends LuceneTestCase {
while(System.currentTimeMillis() < searchStopTime) {
BytesRef term = termsEnum.next();
if (term == null) {
if (seenTermCount == 0) {
break;
}
totTermCount.set(seenTermCount);
seenTermCount = 0;
trigger = totTermCount.get()/10;
@ -282,6 +288,9 @@ public class TestNRTThreads extends LuceneTestCase {
if (VERBOSE) {
System.out.println("TEST: DONE search: totHits=" + totHits);
}
} else {
Thread.sleep(100);
}
}
if (VERBOSE) {