mirror of https://github.com/apache/lucene.git
SOLR-14937: Correct client.queryDefaults().set(...) calls in some JSON facet tests. (#1987)
This commit is contained in:
parent
98594b54fd
commit
7a09cc1d49
|
@ -506,7 +506,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
|
|||
|
||||
initServers();
|
||||
final Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set("shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
client.queryDefaults().set("shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
|
||||
List<SolrClient> clients = client.getClientProvider().all();
|
||||
assertTrue(clients.size() >= 3); // we only use 2, but assert 3 to also test empty shard
|
||||
|
@ -596,7 +596,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
|
|||
public void testSortedFacetRefinementPushingNonRefinedBucketBackIntoTopN() throws Exception {
|
||||
initServers();
|
||||
final Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set("shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
client.queryDefaults().set("shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
|
||||
List<SolrClient> clients = client.getClientProvider().all();
|
||||
assertTrue(clients.size() >= 3); // we only use 2, but assert 3 to also test empty shard
|
||||
|
@ -828,7 +828,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
|
|||
public void testProcessEmptyRefinement() throws Exception {
|
||||
initServers();
|
||||
final Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set("shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
client.queryDefaults().set("shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
|
||||
List<SolrClient> clients = client.getClientProvider().all();
|
||||
assertTrue(clients.size() >= 3); // we only use 2, but assert at least 3 to also test empty shard
|
||||
|
@ -884,7 +884,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
|
|||
private int initSomeDocsWhere1ShardHasOnlyParentFacetField() throws Exception {
|
||||
initServers();
|
||||
final Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set("shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
client.queryDefaults().set("shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
|
||||
final List<SolrClient> clients = client.getClientProvider().all();
|
||||
assertTrue(clients.size() >= 2);
|
||||
|
@ -1043,7 +1043,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
|
|||
public void doBasicRefinement(ModifiableSolrParams p) throws Exception {
|
||||
initServers();
|
||||
Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set("shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
client.queryDefaults().set("shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
|
||||
List<SolrClient> clients = client.getClientProvider().all();
|
||||
assertTrue(clients.size() >= 3);
|
||||
|
@ -1476,7 +1476,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
|
|||
public void testIndexAscRefineConsistency() throws Exception {
|
||||
initServers();
|
||||
final Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set("shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
client.queryDefaults().set("shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()));
|
||||
|
||||
List<SolrClient> clients = client.getClientProvider().all();
|
||||
assertTrue(clients.size() >= 3);
|
||||
|
|
|
@ -1104,7 +1104,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
|
|||
public void testStatsDistrib() throws Exception {
|
||||
initServers();
|
||||
Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set( "shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
client.queryDefaults().set( "shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
doStats( client, params() );
|
||||
}
|
||||
|
||||
|
@ -2960,7 +2960,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
|
|||
public void testOverrequest() throws Exception {
|
||||
initServers();
|
||||
Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set( "shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
client.queryDefaults().set( "shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
|
||||
List<SolrClient> clients = client.getClientProvider().all();
|
||||
assertTrue(clients.size() >= 3);
|
||||
|
@ -3458,7 +3458,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
|
|||
public void testFacetValueTypesDistrib() throws Exception {
|
||||
initServers();
|
||||
Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set( "shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
client.queryDefaults().set( "shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
doFacetValueTypeValidation(client);
|
||||
}
|
||||
|
||||
|
|
|
@ -87,7 +87,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
|
|||
public void testRangeOtherWhiteboxDistrib() throws Exception {
|
||||
initServers();
|
||||
Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set( "shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
client.queryDefaults().set( "shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
}
|
||||
|
||||
public void testRangeOtherWhitebox() throws Exception {
|
||||
|
@ -167,7 +167,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
|
|||
public void testDateFacetsDistrib() throws Exception {
|
||||
initServers();
|
||||
Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set( "shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
client.queryDefaults().set( "shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
doDateFacets(client);
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
|
|||
public void testRangeFacetWithRangesDistrib() throws Exception {
|
||||
initServers();
|
||||
Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set( "shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
client.queryDefaults().set( "shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
doRangeFacetWithRanges(client);
|
||||
}
|
||||
|
||||
|
@ -304,7 +304,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
|
|||
public void testRangeFacetWithRangesInNewFormatDistrib() throws Exception {
|
||||
initServers();
|
||||
Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set( "shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
client.queryDefaults().set( "shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
doRangeFacetWithRangesInNewFormat(client);
|
||||
}
|
||||
|
||||
|
@ -403,7 +403,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
|
|||
public void testFacetValueTypeDistrib() throws Exception {
|
||||
initServers();
|
||||
Client client = servers.getClient(random().nextInt());
|
||||
client.queryDefaults().set( "shards", servers.getShards(), "debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
client.queryDefaults().set( "shards", servers.getShards()).set("debugQuery", Boolean.toString(random().nextBoolean()) );
|
||||
doFacetValueTypeValidation(client);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue