lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jpou...@apache.org
Subject svn commit: r1722363 - in /lucene/dev/trunk: ./ lucene/ lucene/core/ lucene/core/src/test/org/apache/lucene/search/TestBooleanRewrites.java
Date Wed, 30 Dec 2015 15:45:55 GMT
Author: jpountz
Date: Wed Dec 30 15:45:54 2015
New Revision: 1722363

URL: http://svn.apache.org/viewvc?rev=1722363&view=rev
Log:
Fix test failure that was due to rounding errors.

Modified:
    lucene/dev/trunk/   (props changed)
    lucene/dev/trunk/lucene/   (props changed)
    lucene/dev/trunk/lucene/core/   (props changed)
    lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestBooleanRewrites.java

Modified: lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestBooleanRewrites.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestBooleanRewrites.java?rev=1722363&r1=1722362&r2=1722363&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestBooleanRewrites.java
(original)
+++ lucene/dev/trunk/lucene/core/src/test/org/apache/lucene/search/TestBooleanRewrites.java
Wed Dec 30 15:45:54 2015
@@ -286,12 +286,7 @@ public class TestBooleanRewrites extends
       Query query = randomQuery();
       final TopDocs td1 = searcher1.search(query, 100);
       final TopDocs td2 = searcher2.search(query, 100);
-      try {
       assertEquals(td1, td2);
-      } catch (AssertionError e) {
-        System.out.println(query);
-        throw e;
-      }
     }
 
     searcher1.getIndexReader().close();
@@ -320,7 +315,7 @@ public class TestBooleanRewrites extends
 
   private Query randomQuery() {
     if (random().nextInt(10) == 0) {
-      return new BoostQuery(randomQuery(), random().nextFloat());
+      return new BoostQuery(randomBooleanQuery(), TestUtil.nextInt(random(), 1, 10));
     }
     switch (random().nextInt(6)) {
       case 0:



Mime
View raw message