mirror of https://github.com/apache/lucene.git
fix testcase to not run beyond its end time; remove dead code
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1298397 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1c91c60468
commit
6c8848b1f4
|
@ -359,20 +359,14 @@ public abstract class ThreadedIndexingAndSearchingTestCase extends LuceneTestCas
|
|||
trigger = totTermCount.get()/30;
|
||||
shift = random.nextInt(trigger);
|
||||
}
|
||||
while (true) {
|
||||
while (System.currentTimeMillis() < stopTimeMS) {
|
||||
BytesRef term = termsEnum.next();
|
||||
if (term == null) {
|
||||
if (seenTermCount == 0) {
|
||||
break;
|
||||
}
|
||||
totTermCount.set(seenTermCount);
|
||||
break;
|
||||
}
|
||||
seenTermCount++;
|
||||
// search 30 terms
|
||||
if (trigger == 0) {
|
||||
trigger = 1;
|
||||
}
|
||||
if ((seenTermCount + shift) % trigger == 0) {
|
||||
//if (VERBOSE) {
|
||||
//System.out.println(Thread.currentThread().getName() + " now search body:" + term.utf8ToString());
|
||||
|
|
Loading…
Reference in New Issue