Apache Solr open-source search software
SOLR-10926: Increase the odds of randomly choosing point fields in our SolrTestCaseJ4 numeric type randomization
Steve Rowe59db1a86622c
diff --git a/solr/CHANGES.txt b/solr/CHANGES.txtindex b493a1c9699..0f437a9ea25 100644--- a/solr/CHANGES.txt+++ b/solr/CHANGES.txt@@ -567,6 +567,9 @@ Other Changes* SOLR-11056: Add random range query test that compares results across Trie*, *Point and DocValue-only fields(Tomás Fernández Löbbe)+* SOLR-10926: Increase the odds of randomly choosing point fields in our SolrTestCaseJ4 numeric type randomization.+ (hossman, Steve Rowe)+================== 6.7.0 ==================Consult the LUCENE_CHANGES.txt file for additional, low level, changes in this release.diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.javaindex 6e23d45d303..0446093324b 100644--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java@@ -2705,7 +2705,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {System.setProperty(NUMERIC_DOCVALUES_SYSPROP, ""+useDV);// consume a consistent amount of random data even if sysprop/annotation is set- final boolean randUsePoints = random().nextBoolean();+ final boolean randUsePoints = 0 != random().nextInt(5); // 80% likelihoodfinal String usePointsStr = System.getProperty(USE_NUMERIC_POINTS_SYSPROP);final boolean usePoints = (null == usePointsStr) ? randUsePoints : Boolean.parseBoolean(usePointsStr);