tests: ignore expected exceptions

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@926793 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Yonik Seeley 2010-03-23 21:32:01 +00:00
parent f6126f8808
commit 273c083db0
2 changed files with 10 additions and 0 deletions

View File

@ -256,6 +256,15 @@ public class FacetComponent extends SearchComponent
// step through each facet.field, adding results from this shard
NamedList 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);
}

View File

@ -38,6 +38,7 @@ abstract public class SolrExampleTestBase extends AbstractSolrTestCase
@Override
public void setUp() throws Exception
{
ignoreException("maxWarmingSearchers");
super.setUp();
// this sets the property for jetty starting SolrDispatchFilter