lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mikemcc...@apache.org
Subject svn commit: r1360978 - in /lucene/dev/branches/branch_4x: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/index/TestDocsAndPositions.java
Date Thu, 12 Jul 2012 21:57:06 GMT
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);



Mime
View raw message