From d326adc8bfa33432d50293402a39454d60e070e4 Mon Sep 17 00:00:00 2001 From: Alan Woodward Date: Wed, 21 Sep 2016 10:57:50 +0100 Subject: [PATCH] SOLR-9305, SOLR-9390: Don't use directToLeaders updates in partition tests (see SOLR-9512) --- .../org/apache/solr/cloud/HttpPartitionTest.java | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) 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 63dab3bcdf2..faf3309a65e 100644 --- a/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java +++ b/solr/core/src/test/org/apache/solr/cloud/HttpPartitionTest.java @@ -35,6 +35,7 @@ import org.apache.solr.JSONTestUtil; import org.apache.solr.SolrTestCaseJ4.SuppressSSL; import org.apache.solr.client.solrj.SolrServerException; import org.apache.solr.client.solrj.embedded.JettySolrRunner; +import org.apache.solr.client.solrj.impl.CloudSolrClient; import org.apache.solr.client.solrj.impl.HttpSolrClient; import org.apache.solr.client.solrj.request.CollectionAdminRequest; import org.apache.solr.client.solrj.request.QueryRequest; @@ -80,7 +81,20 @@ public class HttpPartitionTest extends AbstractFullDistribZkTestBase { sliceCount = 2; fixShardCount(3); } - + + /** + * We need to turn off directUpdatesToLeadersOnly due to SOLR-9512 + */ + @Override + protected CloudSolrClient createCloudClient(String defaultCollection) { + CloudSolrClient client = getCloudSolrClient(zkServer.getZkAddress(), false); + client.setParallelUpdates(random().nextBoolean()); + if (defaultCollection != null) client.setDefaultCollection(defaultCollection); + client.getLbClient().setConnectionTimeout(30000); + client.getLbClient().setSoTimeout(60000); + return client; + } + /** * Overrides the parent implementation to install a SocketProxy in-front of the Jetty server. */