You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by si...@apache.org on 2015/06/16 10:23:05 UTC

svn commit: r1685732 - in /lucene/dev/branches/lucene_solr_5_2: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java

Author: simonw
Date: Tue Jun 16 08:23:05 2015
New Revision: 1685732

URL: http://svn.apache.org/r1685732
Log:
LUCENE-6559: Fix test, last collected doc can now be unknown

Modified:
    lucene/dev/branches/lucene_solr_5_2/   (props changed)
    lucene/dev/branches/lucene_solr_5_2/lucene/   (props changed)
    lucene/dev/branches/lucene_solr_5_2/lucene/core/   (props changed)
    lucene/dev/branches/lucene_solr_5_2/lucene/core/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java

Modified: lucene/dev/branches/lucene_solr_5_2/lucene/core/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene_solr_5_2/lucene/core/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java?rev=1685732&r1=1685731&r2=1685732&view=diff
==============================================================================
--- lucene/dev/branches/lucene_solr_5_2/lucene/core/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java (original)
+++ lucene/dev/branches/lucene_solr_5_2/lucene/core/src/test/org/apache/lucene/search/TestTimeLimitingCollector.java Tue Jun 16 08:23:05 2015
@@ -197,7 +197,7 @@ public class TestTimeLimitingCollector e
     // greediness affect last doc collected
     int exceptionDoc = timoutException.getLastDocCollected();
     int lastCollected = myHc.getLastDocCollected(); 
-    assertTrue( "doc collected at timeout must be > 0!", exceptionDoc > 0 );
+    assertTrue( "doc collected at timeout must be > 0! or == -1 but was: " + exceptionDoc, exceptionDoc == -1 || exceptionDoc > 0);
     if (greedy) {
       assertTrue("greedy="+greedy+" exceptionDoc="+exceptionDoc+" != lastCollected="+lastCollected, exceptionDoc==lastCollected);
       assertTrue("greedy, but no hits found!", myHc.hitCount() > 0 );