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();
|
initServers();
|
||||||
final Client client = servers.getClient(random().nextInt());
|
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();
|
List<SolrClient> clients = client.getClientProvider().all();
|
||||||
assertTrue(clients.size() >= 3); // we only use 2, but assert 3 to also test empty shard
|
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 {
|
public void testSortedFacetRefinementPushingNonRefinedBucketBackIntoTopN() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
final Client client = servers.getClient(random().nextInt());
|
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();
|
List<SolrClient> clients = client.getClientProvider().all();
|
||||||
assertTrue(clients.size() >= 3); // we only use 2, but assert 3 to also test empty shard
|
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 {
|
public void testProcessEmptyRefinement() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
final Client client = servers.getClient(random().nextInt());
|
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();
|
List<SolrClient> clients = client.getClientProvider().all();
|
||||||
assertTrue(clients.size() >= 3); // we only use 2, but assert at least 3 to also test empty shard
|
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 {
|
private int initSomeDocsWhere1ShardHasOnlyParentFacetField() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
final Client client = servers.getClient(random().nextInt());
|
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();
|
final List<SolrClient> clients = client.getClientProvider().all();
|
||||||
assertTrue(clients.size() >= 2);
|
assertTrue(clients.size() >= 2);
|
||||||
|
@ -1043,7 +1043,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
|
||||||
public void doBasicRefinement(ModifiableSolrParams p) throws Exception {
|
public void doBasicRefinement(ModifiableSolrParams p) throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
Client client = servers.getClient(random().nextInt());
|
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();
|
List<SolrClient> clients = client.getClientProvider().all();
|
||||||
assertTrue(clients.size() >= 3);
|
assertTrue(clients.size() >= 3);
|
||||||
|
@ -1476,7 +1476,7 @@ public class TestJsonFacetRefinement extends SolrTestCaseHS {
|
||||||
public void testIndexAscRefineConsistency() throws Exception {
|
public void testIndexAscRefineConsistency() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
final Client client = servers.getClient(random().nextInt());
|
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();
|
List<SolrClient> clients = client.getClientProvider().all();
|
||||||
assertTrue(clients.size() >= 3);
|
assertTrue(clients.size() >= 3);
|
||||||
|
|
|
@ -1104,7 +1104,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
|
||||||
public void testStatsDistrib() throws Exception {
|
public void testStatsDistrib() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
Client client = servers.getClient(random().nextInt());
|
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() );
|
doStats( client, params() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2960,7 +2960,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
|
||||||
public void testOverrequest() throws Exception {
|
public void testOverrequest() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
Client client = servers.getClient(random().nextInt());
|
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();
|
List<SolrClient> clients = client.getClientProvider().all();
|
||||||
assertTrue(clients.size() >= 3);
|
assertTrue(clients.size() >= 3);
|
||||||
|
@ -3458,7 +3458,7 @@ public class TestJsonFacets extends SolrTestCaseHS {
|
||||||
public void testFacetValueTypesDistrib() throws Exception {
|
public void testFacetValueTypesDistrib() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
Client client = servers.getClient(random().nextInt());
|
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);
|
doFacetValueTypeValidation(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
|
||||||
public void testRangeOtherWhiteboxDistrib() throws Exception {
|
public void testRangeOtherWhiteboxDistrib() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
Client client = servers.getClient(random().nextInt());
|
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 {
|
public void testRangeOtherWhitebox() throws Exception {
|
||||||
|
@ -167,7 +167,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
|
||||||
public void testDateFacetsDistrib() throws Exception {
|
public void testDateFacetsDistrib() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
Client client = servers.getClient(random().nextInt());
|
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);
|
doDateFacets(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -234,7 +234,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
|
||||||
public void testRangeFacetWithRangesDistrib() throws Exception {
|
public void testRangeFacetWithRangesDistrib() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
Client client = servers.getClient(random().nextInt());
|
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);
|
doRangeFacetWithRanges(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -304,7 +304,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
|
||||||
public void testRangeFacetWithRangesInNewFormatDistrib() throws Exception {
|
public void testRangeFacetWithRangesInNewFormatDistrib() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
Client client = servers.getClient(random().nextInt());
|
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);
|
doRangeFacetWithRangesInNewFormat(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -403,7 +403,7 @@ public class TestJsonRangeFacets extends SolrTestCaseHS {
|
||||||
public void testFacetValueTypeDistrib() throws Exception {
|
public void testFacetValueTypeDistrib() throws Exception {
|
||||||
initServers();
|
initServers();
|
||||||
Client client = servers.getClient(random().nextInt());
|
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);
|
doFacetValueTypeValidation(client);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue