SOLR-9305, SOLR-9390: Don't use directToLeaders updates in partition tests (see SOLR-9512)

This commit is contained in:
Alan Woodward 2016-09-21 10:57:50 +01:00
parent 3acfa08aea
commit d326adc8bf
1 changed files with 15 additions and 1 deletions

View File

@ -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.
*/