From 1582509d045fdf43ec4103f9c512e91e85f3e273 Mon Sep 17 00:00:00 2001 From: Tomas Fernandez Lobbe Date: Wed, 26 Jul 2017 17:06:38 -0700 Subject: [PATCH] SOLR-11070: Fix DocValuesTest.testFloatAndDoubleRangeQueryRandom Updated test to consider Infinity a match when using * in range query --- solr/core/src/test/org/apache/solr/schema/DocValuesTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/schema/DocValuesTest.java b/solr/core/src/test/org/apache/solr/schema/DocValuesTest.java index 43c0006c782..dcda834dac8 100644 --- a/solr/core/src/test/org/apache/solr/schema/DocValuesTest.java +++ b/solr/core/src/test/org/apache/solr/schema/DocValuesTest.java @@ -614,8 +614,8 @@ public class DocValuesTest extends SolrTestCaseJ4 { long minSortable = toSortableLong.get(i).apply(minVal); long maxSortable = toSortableLong.get(i).apply(maxVal); - if((minInclusive && minSortable<=valSortable || !minInclusive && minSortable=valSortable || !maxInclusive && maxSortable>valSortable)) { + if((minInclusive && minSortable<=valSortable || !minInclusive && minSortable=valSortable || !maxInclusive && maxSortable>valSortable || (max.equals("*") && val == positiveInfinity[i]))) { counter++; tests.add("//result/doc["+counter+"]/str[@name='id'][.="+(k+1)+"]"); tests.add("//result/doc["+counter+"]/float[@name='score'][.=1.0]");