LUCENE-6559: Fix test, last collected doc can now be unknown

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1685730 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Simon Willnauer 2015-06-16 08:20:54 +00:00
parent b2394ff752
commit a864970331
1 changed files with 1 additions and 1 deletions

View File

@ -197,7 +197,7 @@ public class TestTimeLimitingCollector extends LuceneTestCase {
// 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 );