SOLR-11070: Fix DocValuesTest.testFloatAndDoubleRangeQueryRandom

Updated test to consider Infinity a match when using * in range query
This commit is contained in:
Tomas Fernandez Lobbe 2017-07-26 17:06:38 -07:00
parent 9e8027d39a
commit 1582509d04
1 changed files with 2 additions and 2 deletions

View File

@ -614,8 +614,8 @@ public class DocValuesTest extends SolrTestCaseJ4 {
long minSortable = toSortableLong.get(i).apply(minVal); long minSortable = toSortableLong.get(i).apply(minVal);
long maxSortable = toSortableLong.get(i).apply(maxVal); long maxSortable = toSortableLong.get(i).apply(maxVal);
if((minInclusive && minSortable<=valSortable || !minInclusive && minSortable<valSortable) && if((minInclusive && minSortable<=valSortable || !minInclusive && minSortable<valSortable || (min.equals("*") && val == negativeInfinity[i])) &&
(maxInclusive && maxSortable>=valSortable || !maxInclusive && maxSortable>valSortable)) { (maxInclusive && maxSortable>=valSortable || !maxInclusive && maxSortable>valSortable || (max.equals("*") && val == positiveInfinity[i]))) {
counter++; counter++;
tests.add("//result/doc["+counter+"]/str[@name='id'][.="+(k+1)+"]"); tests.add("//result/doc["+counter+"]/str[@name='id'][.="+(k+1)+"]");
tests.add("//result/doc["+counter+"]/float[@name='score'][.=1.0]"); tests.add("//result/doc["+counter+"]/float[@name='score'][.=1.0]");