Apache Lucene open-source search software
tests: ignore expected exceptions
Yonik Seeley273c083db041
diff --git a/solr/src/java/org/apache/solr/handler/component/FacetComponent.java b/solr/src/java/org/apache/solr/handler/component/FacetComponent.javaindex 9a46a947b51..78fc84b7480 100644--- a/solr/src/java/org/apache/solr/handler/component/FacetComponent.java+++ b/solr/src/java/org/apache/solr/handler/component/FacetComponent.java@@ -256,6 +256,15 @@ public class FacetComponent extends SearchComponent// step through each facet.field, adding results from this shardNamedList facet_fields = (NamedList)facet_counts.get("facet_fields");++ // an error could cause facet_fields to come back null+ if (facet_fields == null) {+ String msg = (String)facet_counts.get("exception");+ if (msg == null) msg = "faceting exception in sub-request - missing facet_fields";+ throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, msg);++ }+for (DistribFieldFacet dff : fi.facets.values()) {dff.add(shardNum, (NamedList)facet_fields.get(dff.getKey()), dff.initialLimit);}diff --git a/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java b/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.javaindex b4dc835c622..d9725aafd93 100644--- a/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java+++ b/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java@@ -38,6 +38,7 @@ abstract public class SolrExampleTestBase extends AbstractSolrTestCase@Overridepublic void setUp() throws Exception{+ ignoreException("maxWarmingSearchers");super.setUp();// this sets the property for jetty starting SolrDispatchFilter