mirror of https://github.com/apache/lucene.git
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:
parent
cdf6350cd6
commit
14f4e0475d
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue