Skip to content

Apache Lucene open-source search software

SOLR-9305, SOLR-9390: *really* dont' use directToLeaders

Alan Woodwarda41dd86e3cbb
diff --git a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
index faf3309a65e..82fbec0c714 100644
--- a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
+++ b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java
@@ -87,7 +87,10 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase {
*/
@Override
protected CloudSolrClient createCloudClient(String defaultCollection) {
- CloudSolrClient client = getCloudSolrClient(zkServer.getZkAddress(), false);
+ CloudSolrClient client = new CloudSolrClient.Builder()
+ .withZkHost(zkServer.getZkAddress())
+ .sendDirectUpdatesToAnyShardReplica()
+ .build();
client.setParallelUpdates(random().nextBoolean());
if (defaultCollection != null) client.setDefaultCollection(defaultCollection);
client.getLbClient().setConnectionTimeout(30000);