lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r926793 - in /lucene/dev/trunk/solr/src: java/org/apache/solr/handler/component/FacetComponent.java test/org/apache/solr/client/solrj/SolrExampleTestBase.java
Date Tue, 23 Mar 2010 21:32:01 GMT
Author: yonik
Date: Tue Mar 23 21:32:01 2010
New Revision: 926793

URL: http://svn.apache.org/viewvc?rev=926793&view=rev
Log:
tests: ignore expected exceptions

Modified:
    lucene/dev/trunk/solr/src/java/org/apache/solr/handler/component/FacetComponent.java
    lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java

Modified: lucene/dev/trunk/solr/src/java/org/apache/solr/handler/component/FacetComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/java/org/apache/solr/handler/component/FacetComponent.java?rev=926793&r1=926792&r2=926793&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/java/org/apache/solr/handler/component/FacetComponent.java (original)
+++ lucene/dev/trunk/solr/src/java/org/apache/solr/handler/component/FacetComponent.java Tue
Mar 23 21:32:01 2010
@@ -256,6 +256,15 @@ public class  FacetComponent extends Sea
 
       // 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);
       }

Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java?rev=926793&r1=926792&r2=926793&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java (original)
+++ lucene/dev/trunk/solr/src/test/org/apache/solr/client/solrj/SolrExampleTestBase.java Tue
Mar 23 21:32:01 2010
@@ -38,6 +38,7 @@ abstract public class SolrExampleTestBas
   @Override
   public void setUp() throws Exception
   {
+    ignoreException("maxWarmingSearchers");
     super.setUp();
     
     // this sets the property for jetty starting SolrDispatchFilter



Mime
View raw message