Apache Solr open-source search software
Rename BaseDistributedSearchTestCase.queryServer (#3639)
David Smiley8bbc3d84be84
diff --git a/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java b/solr/core/src/test/org/apache/solr/TestDistributedGrouping.javaindex ae55c613c26..a2bbcadb37d 100644--- a/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java+++ b/solr/core/src/test/org/apache/solr/TestDistributedGrouping.java@@ -18,11 +18,9 @@ package org.apache.solr;import static org.hamcrest.CoreMatchers.containsString;-import java.io.IOException;import java.util.List;import org.apache.solr.SolrTestCaseJ4.SuppressPointFields;import org.apache.solr.client.solrj.SolrClient;-import org.apache.solr.client.solrj.SolrServerException;import org.apache.solr.client.solrj.response.QueryResponse;import org.apache.solr.common.SolrDocumentList;import org.apache.solr.common.SolrException;@@ -1652,13 +1650,13 @@ public class TestDistributedGrouping extends BaseDistributedSearchTestCase {"true");}- private void simpleQuery(Object... queryParams) throws SolrServerException, IOException {+ private void simpleQuery(Object... queryParams) throws Exception {ModifiableSolrParams params = new ModifiableSolrParams();for (int i = 0; i < queryParams.length; i += 2) {params.add(queryParams[i].toString(), queryParams[i + 1].toString());}params.set("shards", shards);- queryServer(params);+ queryRandomShard(params);}/**diff --git a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java b/solr/core/src/test/org/apache/solr/TestDistributedSearch.javaindex 5100ea7c38f..72d0493be55 100644--- a/solr/core/src/test/org/apache/solr/TestDistributedSearch.java+++ b/solr/core/src/test/org/apache/solr/TestDistributedSearch.java@@ -538,7 +538,7 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {+ ":[2008-01-01T00:00:00Z TO 2009-09-01T00:00:00Z]"); // Should be removed from responsesetDistributedParams(minParams);- QueryResponse minResp = queryServer(minParams);+ QueryResponse minResp = queryRandomShard(minParams);// Check that exactly the right numbers of counts came throughassertEquals(@@ -584,7 +584,7 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {"facet.query",tdate_b + ":[2009-01-01T00:00:00Z TO 2010-01-01T00:00:00Z]"); // Should be removedsetDistributedParams(minParams);- minResp = queryServer(minParams);+ minResp = queryRandomShard(minParams);assertEquals("Should only be 1 query facets returned after minCounts taken into account ",@@ -1552,7 +1552,7 @@ public class TestDistributedSearch extends BaseDistributedSearchTestCase {q.set("q", "*:*");q.set(ShardParams.SHARDS_INFO, true);setDistributedParams(q);- rsp = queryServer(q);+ rsp = queryRandomShard(q);NamedList<?> sinfo = (NamedList<?>) rsp.getResponse().get(ShardParams.SHARDS_INFO);String shards = getShardsString();int cnt = shards.length() - shards.replace(",", "").length() + 1;diff --git a/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java b/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.javaindex 31bab80b362..7331bb8ddde 100644--- a/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java+++ b/solr/core/src/test/org/apache/solr/TestHighlightDedupGrouping.java@@ -61,7 +61,7 @@ public class TestHighlightDedupGrouping extends BaseDistributedSearchTestCase {}QueryResponse rsp =- queryServer(+ queryRandomShard(params("q",id_s1 + ":" + docid,@@ -114,7 +114,7 @@ public class TestHighlightDedupGrouping extends BaseDistributedSearchTestCase {for (int group = 1; group <= numGroups; ++group) {QueryResponse rsp =- queryServer(+ queryRandomShard(params("q",group_ti1 + ":" + group + " AND " + id_s1 + ":[* TO *]",diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.javaindex 6191d4807fc..2516726f694 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedExpandComponentTest.java@@ -268,7 +268,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCasparams.add("expand", "true");setDistributedParams(params);- QueryResponse rsp = queryServer(params);+ QueryResponse rsp = query(params);assertCountAndOrder(4, rsp.getResults(), "10" /* c */, "2" /* a */, "13" /* d */, "6" /* b */);Map<String, SolrDocumentList> results = rsp.getExpandedResults();@@ -288,7 +288,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCasparams.add("expand", "true");params.add("expand.sort", "test_l desc");setDistributedParams(params);- rsp = queryServer(params);+ rsp = query(params);assertCountAndOrder(4, rsp.getResults(), "10" /* c */, "2" /* a */, "13" /* d */, "6" /* b */);results = rsp.getExpandedResults();@@ -309,7 +309,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCasparams.add("expand.sort", "test_l desc");params.add("expand.rows", "1");setDistributedParams(params);- rsp = queryServer(params);+ rsp = query(params);assertCountAndOrder(4, rsp.getResults(), "10" /* c */, "2" /* a */, "13" /* d */, "6" /* b */);results = rsp.getExpandedResults();@@ -330,7 +330,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCasparams.add("expand.rows", "0");params.add("fl", "id");setDistributedParams(params);- rsp = queryServer(params);+ rsp = query(params);assertCountAndOrder(4, rsp.getResults(), "10" /* c */, "2" /* a */, "13" /* d */, "6" /* b */);results = rsp.getExpandedResults();@@ -353,7 +353,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCasparams.add("expand.rows", "0");params.add("fl", "id,score");setDistributedParams(params);- rsp = queryServer(params);+ rsp = query(params);assertCountAndOrder(3, rsp.getResults(), "12" /* d */, "1" /* a */, "5" /* b */);results = rsp.getExpandedResults();assertExpandGroups(results, aaa, ddd);@@ -371,7 +371,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCasparams.add("fl", "id");setDistributedParams(params);- rsp = queryServer(params);+ rsp = query(params);assertCountAndOrder(4, rsp.getResults(), "10" /* c */, "2" /* a */, "13" /* d */, "6" /* b */);results = rsp.getExpandedResults();@@ -392,7 +392,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCasparams.add("distrib.singlePass", "true");setDistributedParams(params);- rsp = queryServer(params);+ rsp = query(params);assertCountAndOrder(4, rsp.getResults(), "10" /* c */, "2" /* a */, "13" /* d */, "6" /* b */);results = rsp.getExpandedResults();@@ -414,7 +414,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCas// nullPolicy=expandparams.add("fq", "{!collapse field=" + group + " nullPolicy=expand}");- QueryResponse rsp = queryServer(params);+ QueryResponse rsp = query(params);assertCountAndOrder(6,rsp.getResults(),@@ -434,7 +434,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCas// nullPolicy=collapseparams.set("fq", "{!collapse field=" + group + " nullPolicy=collapse}");- rsp = queryServer(params);+ rsp = query(params);assertCountAndOrder(5,rsp.getResults(),@@ -454,7 +454,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCasparams.set("fq", "{!collapse field=" + group + " nullPolicy=collapse}");params.set("expand.nullGroup", "true");- rsp = queryServer(params);+ rsp = query(params);assertCountAndOrder(5,rsp.getResults(),@@ -475,7 +475,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCasparams.set("fq", "{!collapse field=" + group + " nullPolicy=expand}");params.set("rows", "3");- rsp = queryServer(params);+ rsp = query(params);assertCountAndOrder(3, rsp.getResults(), "10" /* c */, "88" /* null */, "2" /* a */);results = rsp.getExpandedResults();assertExpandGroups(results, aaa, ccc, null);@@ -486,7 +486,7 @@ public class DistributedExpandComponentTest extends BaseDistributedSearchTestCas// nullPolicy=expand w/ expand.nullGroup=true & expand.rows = 0params.set("expand.rows", "0");- rsp = queryServer(params);+ rsp = query(params);assertCountAndOrder(3, rsp.getResults(), "10" /* c */, "88" /* null */, "2" /* a */);results = rsp.getExpandedResults();assertExpandGroups(results, aaa, ccc, null);diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.javaindex 5b7d2025687..51165637243 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetExistsSmallTest.java@@ -159,7 +159,7 @@ public class DistributedFacetExistsSmallTest extends BaseDistributedSearchTestCa() -> {if (random().nextBoolean()) {setDistributedParams(params);- queryServer(params);+ queryRandomShard(params);} else {params.set("distrib", "false");controlClient.query(params);diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.javaindex 2afc6ea3b8b..1ccf53c04ce 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotLongTailTest.java@@ -131,7 +131,7 @@ public class DistributedFacetPivotLongTailTest extends BaseDistributedSearchTestList<PivotField> pivots = null;PivotField pivot = null;pivots =- queryServer(+ queryRandomShard(params("q","*:*",@@ -194,7 +194,7 @@ public class DistributedFacetPivotLongTailTest extends BaseDistributedSearchTest"facet", "true","facet.limit", "6","facet.pivot", "foo_s,bar_s"));- pivots = queryServer(q).getFacetPivot().get("foo_s,bar_s");+ pivots = queryRandomShard(q).getFacetPivot().get("foo_s,bar_s");assertEquals(6, pivots.size());for (int i = 0; i < 5; i++) {@@ -222,7 +222,7 @@ public class DistributedFacetPivotLongTailTest extends BaseDistributedSearchTest// that we get the correct top5 including "tailB"pivots =- queryServer(+ queryRandomShard(params("q", "*:*","shards", getShardsString(),@@ -257,7 +257,7 @@ public class DistributedFacetPivotLongTailTest extends BaseDistributedSearchTest// we're going to miss out on tailBpivots =- queryServer(+ queryRandomShard(params("q", "*:*","shards", getShardsString(),diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.javaindex bb9959cf2f3..2d0380296eb 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallAdvancedTest.java@@ -199,7 +199,7 @@ public class DistributedFacetPivotSmallAdvancedTest extends BaseDistributedSearcModifiableSolrParams q = new ModifiableSolrParams(params);q.set("shards", getShardsString());- QueryResponse rsp = queryServer(q);+ QueryResponse rsp = queryRandomShard(q);FieldStatsInfo fieldStatsInfo = rsp.getFieldStatsInfo().get("foo_i");String msg = q.toString();@@ -299,7 +299,7 @@ public class DistributedFacetPivotSmallAdvancedTest extends BaseDistributedSearc"{!stats=s1}place_t,company_t","stats.field","{!key=avg_price tag=s1}foo_s");- QueryResponse rsp = queryServer(new ModifiableSolrParams(params));+ QueryResponse rsp = queryRandomShard(new ModifiableSolrParams(params));List<PivotField> placePivots = rsp.getFacetPivot().get("place_t,company_t");diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.javaindex 97253a63518..b2f3e1ca6c8 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotSmallTest.java@@ -111,7 +111,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.add("facet", "true");params.add("facet.pivot", "place_t,company_t");- QueryResponse rsp = queryServer(params);+ QueryResponse rsp = queryRandomShard(params);List<PivotField> expectedPlacePivots = new UnorderedEqualityArrayList<PivotField>();List<PivotField> expectedCardiffPivots = new UnorderedEqualityArrayList<PivotField>();@@ -167,7 +167,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.set(FacetParams.FACET_SORT, FacetParams.FACET_SORT_COUNT);- rsp = queryServer(params);+ rsp = queryRandomShard(params);placePivots = rsp.getFacetPivot().get("place_t,company_t");@@ -177,7 +177,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.set(FacetParams.FACET_LIMIT, 2);- rsp = queryServer(params);+ rsp = queryRandomShard(params);expectedPlacePivots = new UnorderedEqualityArrayList<PivotField>();expectedDublinPivots = new UnorderedEqualityArrayList<PivotField>();@@ -199,7 +199,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.set("f.place_t." + FacetParams.FACET_LIMIT, 1);params.set("f.company_t." + FacetParams.FACET_LIMIT, 4);- rsp = queryServer(params);+ rsp = queryRandomShard(params);expectedPlacePivots = new UnorderedEqualityArrayList<PivotField>();@@ -512,7 +512,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.add("facet.range.end", "100");params.add("facet.range.gap", "20");- QueryResponse rsp = queryServer(params);+ QueryResponse rsp = queryRandomShard(params);List<PivotField> expectedPlacePivots = new UnorderedEqualityArrayList<PivotField>();List<PivotField> expectedCardiffPivots = new UnorderedEqualityArrayList<PivotField>();@@ -799,7 +799,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.set(FacetParams.FACET_SORT, FacetParams.FACET_SORT_COUNT);- rsp = queryServer(params);+ rsp = queryRandomShard(params);placePivots = rsp.getFacetPivot().get("place_t,company_t");@@ -809,7 +809,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.set(FacetParams.FACET_LIMIT, 2);- rsp = queryServer(params);+ rsp = queryRandomShard(params);expectedPlacePivots = new UnorderedEqualityArrayList<PivotField>();expectedDublinPivots = new UnorderedEqualityArrayList<PivotField>();@@ -873,7 +873,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.set("f.place_t." + FacetParams.FACET_LIMIT, 1);params.set("f.company_t." + FacetParams.FACET_LIMIT, 4);- rsp = queryServer(params);+ rsp = queryRandomShard(params);expectedPlacePivots = new UnorderedEqualityArrayList<PivotField>();@@ -1160,7 +1160,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.add("facet.pivot", "{!query=s1}place_t,company_t");params.add("facet.query", "{!tag=s1 key=highPrice}price_ti:[25 TO 100]");- QueryResponse rsp = queryServer(params);+ QueryResponse rsp = queryRandomShard(params);List<PivotField> expectedPlacePivots = new UnorderedEqualityArrayList<PivotField>();List<PivotField> expectedCardiffPivots = new UnorderedEqualityArrayList<PivotField>();@@ -1718,7 +1718,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCascreateExpectedQCount(new String[] {"highPrice", "lowPrice"}, new int[] {0, 0}),null));- rsp = queryServer(params);+ rsp = queryRandomShard(params);placePivots = rsp.getFacetPivot().get("place_t,company_t");@@ -1731,7 +1731,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.set(FacetParams.FACET_SORT, FacetParams.FACET_SORT_COUNT);- rsp = queryServer(params);+ rsp = queryRandomShard(params);placePivots = rsp.getFacetPivot().get("place_t,company_t");@@ -1741,7 +1741,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.set(FacetParams.FACET_LIMIT, 2);- rsp = queryServer(params);+ rsp = queryRandomShard(params);expectedPlacePivots = new UnorderedEqualityArrayList<PivotField>();expectedDublinPivots = new UnorderedEqualityArrayList<PivotField>();@@ -1805,7 +1805,7 @@ public class DistributedFacetPivotSmallTest extends BaseDistributedSearchTestCasparams.set("f.place_t." + FacetParams.FACET_LIMIT, 1);params.set("f.company_t." + FacetParams.FACET_LIMIT, 4);- rsp = queryServer(params);+ rsp = queryRandomShard(params);expectedPlacePivots = new UnorderedEqualityArrayList<PivotField>();diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.javaindex fa008726918..a3d29e515dd 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedFacetPivotWhiteBoxTest.java@@ -139,7 +139,7 @@ public class DistributedFacetPivotWhiteBoxTest extends BaseDistributedSearchTest"true","distrib","false");- QueryResponse rsp = queryServer(new ModifiableSolrParams(params));+ QueryResponse rsp = queryRandomShard(new ModifiableSolrParams(params));assertNotNull("initial shard request should include non-null top level stats", rsp.getFieldStatsInfo());diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentCustomSortTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentCustomSortTest.javaindex 37329333fe3..6f4b1bfbcc2 100644--- a/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentCustomSortTest.java+++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedQueryComponentCustomSortTest.java@@ -242,7 +242,7 @@ public class DistributedQueryComponentCustomSortTest extends BaseDistributedSear// Only query a non-control client, as the control and non-control might get different partial// results.rsp =- queryServer(+ queryRandomShard(createParams("q", "text:d","fl", "id",diff --git a/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.java b/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.javaindex b0ea08d1041..f8409483bea 100644--- a/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.java+++ b/solr/core/src/test/org/apache/solr/search/AnalyticsMergeStrategyTest.java@@ -72,7 +72,7 @@ public class AnalyticsMergeStrategyTest extends BaseDistributedSearchTestCase {params.add("q", "*:*");params.add("fq", "{!count}");setDistributedParams(params);- QueryResponse rsp = queryServer(params);+ QueryResponse rsp = query(params);assertCount(rsp, 11);// Test IterativeMergeStrategy@@ -80,14 +80,14 @@ public class AnalyticsMergeStrategyTest extends BaseDistributedSearchTestCase {params.add("q", "*:*");params.add("fq", "{!count iterate=true}");setDistributedParams(params);- rsp = queryServer(params);+ rsp = query(params);assertCountOnly(rsp, 44);params = new ModifiableSolrParams();params.add("q", "id:(1 2 5 6)");params.add("fq", "{!count}");setDistributedParams(params);- rsp = queryServer(params);+ rsp = query(params);assertCount(rsp, 4);}diff --git a/solr/core/src/test/org/apache/solr/search/MergeStrategyTest.java b/solr/core/src/test/org/apache/solr/search/MergeStrategyTest.javaindex bec2b7160ba..78ab04b7a47 100644--- a/solr/core/src/test/org/apache/solr/search/MergeStrategyTest.java+++ b/solr/core/src/test/org/apache/solr/search/MergeStrategyTest.java@@ -90,7 +90,7 @@ public class MergeStrategyTest extends BaseDistributedSearchTestCase {params.add("sort", "sort_i asc");params.add("fl", "*,score");setDistributedParams(params);- QueryResponse rsp = queryServer(params);+ QueryResponse rsp = query(params);assertOrder(rsp, "10", "11", "9", "2", "13", "12", "6", "1", "5", "8", "7");params = new ModifiableSolrParams();@@ -99,7 +99,7 @@ public class MergeStrategyTest extends BaseDistributedSearchTestCase {params.add("sort", "sort_i asc");params.add("fl", "*,score");setDistributedParams(params);- rsp = queryServer(params);+ rsp = query(params);assertOrder(rsp, "7", "8", "5", "1", "6", "12", "13", "2", "9", "11", "10");MergeStrategy m1 =diff --git a/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.java b/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.javaindex 017b651dd5b..3483fc1cea9 100644--- a/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.java+++ b/solr/core/src/test/org/apache/solr/search/facet/DistributedFacetSimpleRefinementLongTailTest.java@@ -216,7 +216,7 @@ public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistributeList<NamedList> foo_buckets =(List<NamedList>)((NamedList<NamedList>)- queryServer(+ queryRandomShard(params("q","*:*",@@ -250,7 +250,7 @@ public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistributeList<NamedList> foo_buckets =(List<NamedList>)((NamedList<NamedList>)- queryServer(+ queryRandomShard(params("q","*:*",@@ -317,7 +317,7 @@ public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistributeList<NamedList> buckets =(List<NamedList>)((NamedList<NamedList>)- queryServer(+ queryRandomShard(params("q","*:*",@@ -368,7 +368,7 @@ public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistributeList<NamedList> buckets =(List<NamedList>)((NamedList<NamedList>)- queryServer(+ queryRandomShard(params("q","*:*",@@ -414,7 +414,7 @@ public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistributeList<NamedList> buckets =(List<NamedList>)((NamedList<NamedList>)- queryServer(+ queryRandomShard(params("q","*:*",@@ -469,7 +469,7 @@ public class DistributedFacetSimpleRefinementLongTailTest extends BaseDistribute@SuppressWarnings({"unchecked", "rawtypes"})NamedList<NamedList> all_facets =(NamedList)- queryServer(+ queryRandomShard(params("q","*:*",diff --git a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.javaindex fb24cfa30f0..ff9eb17cc05 100644--- a/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java+++ b/solr/test-framework/src/java/org/apache/solr/BaseDistributedSearchTestCase.java@@ -594,7 +594,12 @@ public abstract class BaseDistributedSearchTestCase extends SolrTestCaseJ4 {}}- protected QueryResponse queryServer(ModifiableSolrParams params)+ /**+ * Queries a random shard; nothing more.+ *+ * <p>WARNING: tests should generally not call this as it doesn't compare to the control client+ */+ protected QueryResponse queryRandomShard(ModifiableSolrParams params)throws SolrServerException, IOException {// query a random serverint which = r.nextInt(clients.size());@@ -603,24 +608,24 @@ public abstract class BaseDistributedSearchTestCase extends SolrTestCaseJ4 {return rsp;}- /** Sets distributed params. Returns the QueryResponse from {@link #queryServer}, */+ /** Sets distributed params. Returns the distributed QueryResponse */protected QueryResponse query(Object... q) throws Exception {return query(true, q);}- /** Sets distributed params. Returns the QueryResponse from {@link #queryServer}, */+ /** Sets distributed params. Returns the distributed QueryResponse */protected QueryResponse query(SolrParams params) throws Exception {return query(true, params);}- /** Returns the QueryResponse from {@link #queryServer} */+ /** Returns the distributed QueryResponse */protected QueryResponse query(boolean setDistribParams, Object[] q) throws Exception {final ModifiableSolrParams params = createParams(q);return query(setDistribParams, params);}- /** Returns the QueryResponse from {@link #queryServer} */+ /** Returns the distributed QueryResponse */protected QueryResponse query(boolean setDistribParams, SolrParams p) throws Exception {final ModifiableSolrParams params = new ModifiableSolrParams(p);@@ -637,7 +642,7 @@ public abstract class BaseDistributedSearchTestCase extends SolrTestCaseJ4 {params.remove("distrib");if (setDistribParams) setDistributedParams(params);- QueryResponse rsp = queryServer(params);+ QueryResponse rsp = queryRandomShard(params);compareResponses(rsp, controlRsp);diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.javaindex 3587d949f22..74a02b44988 100644--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.java+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractBasicDistributedZkTestBase.java@@ -759,7 +759,7 @@ public abstract class AbstractBasicDistributedZkTestBase extends AbstractFullDisSolrQuery query = new SolrQuery("*:*");query.addFacetField(tsort);query.setFacetMissing(false);- QueryResponse resp = queryServer(query);+ QueryResponse resp = queryRandomShard(query);List<FacetField> ffs = resp.getFacetFields();for (FacetField ff : ffs) {if (ff.getName().equals(tsort) == false) continue;@@ -792,7 +792,7 @@ public abstract class AbstractBasicDistributedZkTestBase extends AbstractFullDisquery.addField("*");query.addField("eoe_sortable");query.addField(tsort);- QueryResponse resp = queryServer(query);+ QueryResponse resp = queryRandomShard(query);SolrDocumentList docs = resp.getResults();@@ -809,7 +809,7 @@ public abstract class AbstractBasicDistributedZkTestBase extends AbstractFullDisSolrQuery query = new SolrQuery("*:*");query.add("group", "true");query.add("group.field", tsort);- QueryResponse resp = queryServer(query);+ QueryResponse resp = queryRandomShard(query);GroupResponse groupResp = resp.getGroupResponse();List<GroupCommand> grpCmds = groupResp.getValues();for (GroupCommand grpCmd : grpCmds) {@@ -1202,7 +1202,7 @@ public abstract class AbstractBasicDistributedZkTestBase extends AbstractFullDis// query for each doc, and check both fields to ensure the value is correctfor (int i = 1; i < numLoops; i++) {final String query = id + ":" + i;- QueryResponse qres = queryServer(new SolrQuery(query));+ QueryResponse qres = queryRandomShard(new SolrQuery(query));assertEquals(chain + ": query failed: " + query, 0, qres.getStatus());assertEquals(chain + ": didn't find correct # docs with query: " + query,@@ -1701,10 +1701,10 @@ public abstract class AbstractBasicDistributedZkTestBase extends AbstractFullDis}@Override- protected QueryResponse queryServer(ModifiableSolrParams params)+ protected QueryResponse queryRandomShard(ModifiableSolrParams params)throws SolrServerException, IOException {- if (r.nextBoolean()) return super.queryServer(params);+ if (r.nextBoolean()) return super.queryRandomShard(params);if (r.nextBoolean()) params.set("collection", DEFAULT_COLLECTION);diff --git a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.javaindex 92ff503ba85..70fdbc57a87 100644--- a/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java+++ b/solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java@@ -1844,7 +1844,7 @@ public abstract class AbstractFullDistribZkTestBase extends AbstractDistribZkTes}@Override- protected QueryResponse queryServer(ModifiableSolrParams params)+ protected QueryResponse queryRandomShard(ModifiableSolrParams params)throws SolrServerException, IOException {if (r.nextBoolean()) params.set("collection", DEFAULT_COLLECTION);