mirror of https://github.com/apache/lucene.git
LUCENE-4211: fix one test bug
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1360977 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d6254caf80
commit
abf9894023
|
@ -171,8 +171,9 @@ public class TestDocsAndPositions extends LuceneTestCase {
|
|||
}
|
||||
|
||||
if (random().nextInt(10) == 0) { // once is a while advance
|
||||
docsAndPosEnum
|
||||
.advance(docID + 1 + random().nextInt((maxDoc - docID)));
|
||||
if (docsAndPosEnum.advance(docID + 1 + random().nextInt((maxDoc - docID))) == DocIdSetIterator.NO_MORE_DOCS) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
} while (docsAndPosEnum.nextDoc() != DocIdSetIterator.NO_MORE_DOCS);
|
||||
|
|
Loading…
Reference in New Issue