From 78731ea8f4b7bd91bbd5b4fb442cc423b4caee79 Mon Sep 17 00:00:00 2001 From: yonik Date: Fri, 23 Jun 2017 00:06:51 -0400 Subject: [PATCH] SOLR-10921: set setMaxClauseCount for every SolrConfig creation to work around test framework issues --- solr/core/src/java/org/apache/solr/core/SolrConfig.java | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/solr/core/src/java/org/apache/solr/core/SolrConfig.java b/solr/core/src/java/org/apache/solr/core/SolrConfig.java index bc946e8023d..dc7fe283743 100644 --- a/solr/core/src/java/org/apache/solr/core/SolrConfig.java +++ b/solr/core/src/java/org/apache/solr/core/SolrConfig.java @@ -375,6 +375,14 @@ public class SolrConfig extends Config implements MapSerializable { classVsSolrPluginInfo = Collections.unmodifiableMap(map); } + { + // non-static setMaxClauseCount because the test framework sometimes reverts the value on us and + // the static setting above is only executed once. This re-sets the value every time a SolrConfig + // obect is created. See SOLR-10921 + BooleanQuery.setMaxClauseCount(Integer.MAX_VALUE-1); + } + + public static class SolrPluginInfo { public final Class clazz;