SOLR-6173: Fixed wrong failure message in TestDistributedSearch

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1603494 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Shalin Shekhar Mangar 2014-06-18 15:47:16 +00:00
parent 76f4abe306
commit c0d5fbb829
2 changed files with 18 additions and 8 deletions

View File

@ -88,10 +88,16 @@ Other Changes
================== 4.10.0 =================
Bug fixes
Bug Fixes
----------------------
* SOLR-6095 : SolrCloud cluster can end up without an overseer with overseer roles (Noble Paul, Shalin Mangar)
Other Changes
---------------------
* SOLR-6173: Fixed wrong failure message in TestDistributedSearch. (shalin)
================== 4.9.0 ==================
Versions of Major Components

View File

@ -27,6 +27,7 @@ import org.apache.lucene.util.LuceneTestCase.Slow;
import org.apache.solr.client.solrj.SolrServer;
import org.apache.solr.client.solrj.SolrServerException;
import org.apache.solr.client.solrj.embedded.JettySolrRunner;
import org.apache.solr.client.solrj.impl.HttpSolrServer;
import org.apache.solr.client.solrj.response.QueryResponse;
import org.apache.solr.cloud.ChaosMonkey;
import org.apache.solr.common.SolrException;
@ -269,10 +270,10 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {
query("q","*:*", "sort",i1+" desc", "stats", "true", "stats.field", tdate_b);
handle.put("stats_fields", UNORDERED);
query("q","*:*", "sort",i1+" desc", "stats", "true",
"stats.field", "stats_dt",
"stats.field", i1,
"stats.field", tdate_a,
query("q","*:*", "sort",i1+" desc", "stats", "true",
"stats.field", "stats_dt",
"stats.field", i1,
"stats.field", tdate_a,
"stats.field", tdate_b);
/*** TODO: the failure may come back in "exception"
@ -430,9 +431,12 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {
"stats.field", tdate_a,
"stats.field", tdate_b,
"stats.calcdistinct", "true");
} catch (Exception e) {
log.error("Exception on distrib stats request on empty index", e);
fail("NullPointerException with stats request on empty index");
} catch (HttpSolrServer.RemoteSolrException e) {
if (e.getMessage().startsWith("java.lang.NullPointerException")) {
fail("NullPointerException with stats request on empty index");
} else {
throw e;
}
}
}