SOLR-14937: Correct client.queryDefaults().set(...) calls in some JSON facet tests. (#1987)

This commit is contained in:
Christine Poerschke 2020-10-26 09:43:56 +00:00 committed by GitHub
parent 98594b54fd
commit 7a09cc1d49
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 14 additions and 14 deletions

View File

@ -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);

View File

@ -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);
}

View File

@ -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);
}