You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by mi...@apache.org on 2012/07/12 23:57:06 UTC
svn commit: r1360978 - in /lucene/dev/branches/branch_4x: ./ lucene/
lucene/core/
lucene/core/src/test/org/apache/lucene/index/TestDocsAndPositions.java
Author: mikemccand
Date: Thu Jul 12 21:57:05 2012
New Revision: 1360978
URL: http://svn.apache.org/viewvc?rev=1360978&view=rev
Log:
LUCENE-4211: fix one test bug
Modified:
lucene/dev/branches/branch_4x/ (props changed)
lucene/dev/branches/branch_4x/lucene/ (props changed)
lucene/dev/branches/branch_4x/lucene/core/ (props changed)
lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocsAndPositions.java
Modified: lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocsAndPositions.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocsAndPositions.java?rev=1360978&r1=1360977&r2=1360978&view=diff
==============================================================================
--- lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocsAndPositions.java (original)
+++ lucene/dev/branches/branch_4x/lucene/core/src/test/org/apache/lucene/index/TestDocsAndPositions.java Thu Jul 12 21:57:05 2012
@@ -171,8 +171,9 @@ public class TestDocsAndPositions extend
}
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);