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:
Michael McCandless 2012-03-08 14:02:41 +00:00
parent 1c91c60468
commit 6c8848b1f4
1 changed files with 1 additions and 7 deletions

View File

@ -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());