SOLR-11638: Fix CloudSolrClientTest periodic failures after SOLR-11507

This commit is contained in:
Shalin Shekhar Mangar 2017-11-13 15:50:45 +05:30
parent eec25eacce
commit 3045349140
2 changed files with 7 additions and 2 deletions

View File

@ -157,7 +157,8 @@ Other Changes
* SOLR-10469: Move CloudSolrClient.setParallelUpdates to its Builder. (David Smiley)
* SOLR-11507: Randomize SolrTestCaseJ4.CloudSolrClientBuilder more, and simplify it. (David Smiley)
* SOLR-11507: SOLR-11638: Randomize SolrTestCaseJ4.CloudSolrClientBuilder more, and simplify it.
(Jason Gerlowski, David Smiley)
================== 7.1.0 ==================

View File

@ -812,7 +812,11 @@ public class CloudSolrClientTest extends SolrCloudTestCase {
final String old_leader_core_node_name = slice.getLeader().getName();
// NOTE: creating our own CloudSolrClient whose settings we can muck with...
try (CloudSolrClient stale_client = getCloudSolrClient(cluster.getZkServer().getZkAddress())) {
try (CloudSolrClient stale_client = new CloudSolrClientBuilder()
.withZkHost(cluster.getZkServer().getZkAddress())
.sendDirectUpdatesToAnyShardReplica()
.withParallelUpdates(true)
.build()) {
// don't let collection cache entries get expired, even on a slow machine...
stale_client.setCollectionCacheTTl(Integer.MAX_VALUE);
stale_client.setDefaultCollection(COL);