mirror of https://github.com/apache/lucene.git
tests: increase connection timeouts
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1307123 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
13745b230d
commit
6209a4123b
|
@ -605,7 +605,7 @@ public class BasicDistributedZkTest extends AbstractDistributedZkTestCase {
|
|||
try {
|
||||
// setup the server...
|
||||
HttpSolrServer s = new HttpSolrServer(baseUrl + "/" + collection);
|
||||
s.setConnectionTimeout(100); // 1/10th sec
|
||||
s.setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
|
||||
s.setDefaultMaxConnectionsPerHost(100);
|
||||
s.setMaxTotalConnections(100);
|
||||
return s;
|
||||
|
|
|
@ -1356,7 +1356,7 @@ public class FullSolrCloudTest extends AbstractDistributedZkTestCase {
|
|||
String url = "http://localhost:" + port + context + "/"
|
||||
+ DEFAULT_COLLECTION;
|
||||
HttpSolrServer s = new HttpSolrServer(url);
|
||||
s.setConnectionTimeout(100); // 1/10th sec
|
||||
s.setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
|
||||
s.setSoTimeout(15000);
|
||||
s.setDefaultMaxConnectionsPerHost(100);
|
||||
s.setMaxTotalConnections(100);
|
||||
|
|
|
@ -43,7 +43,7 @@ public class SolrExampleBinaryTest extends SolrExampleTests {
|
|||
// setup the server...
|
||||
String url = "http://localhost:"+port+context;
|
||||
HttpSolrServer s = new HttpSolrServer( url );
|
||||
s.setConnectionTimeout(100); // 1/10th sec
|
||||
s.setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
|
||||
s.setDefaultMaxConnectionsPerHost(100);
|
||||
s.setMaxTotalConnections(100);
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
|
||||
package org.apache.solr.client.solrj.embedded;
|
||||
|
||||
import org.apache.solr.SolrTestCaseJ4;
|
||||
import org.apache.solr.client.solrj.MultiCoreExampleTestBase;
|
||||
import org.apache.solr.client.solrj.SolrQuery;
|
||||
import org.apache.solr.client.solrj.SolrServer;
|
||||
|
@ -95,7 +96,7 @@ public class MultiCoreExampleJettyTest extends MultiCoreExampleTestBase {
|
|||
// setup the server...
|
||||
String url = "http://localhost:"+port+context+"/"+name;
|
||||
HttpSolrServer s = new HttpSolrServer( url );
|
||||
s.setConnectionTimeout(100); // 1/10th sec
|
||||
s.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
|
||||
s.setDefaultMaxConnectionsPerHost(100);
|
||||
s.setMaxTotalConnections(100);
|
||||
return s;
|
||||
|
|
|
@ -260,7 +260,7 @@ public abstract class BaseDistributedSearchTestCase extends SolrTestCaseJ4 {
|
|||
// setup the server...
|
||||
String url = "http://localhost:" + port + context;
|
||||
HttpSolrServer s = new HttpSolrServer(url);
|
||||
s.setConnectionTimeout(100); // 1/10th sec
|
||||
s.setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
|
||||
s.setDefaultMaxConnectionsPerHost(100);
|
||||
s.setMaxTotalConnections(100);
|
||||
return s;
|
||||
|
|
|
@ -88,7 +88,7 @@ abstract public class SolrJettyTestBase extends SolrTestCaseJ4
|
|||
// setup the server...
|
||||
String url = "http://localhost:"+port+context;
|
||||
HttpSolrServer s = new HttpSolrServer( url );
|
||||
s.setConnectionTimeout(100); // 1/10th sec
|
||||
s.setConnectionTimeout(DEFAULT_CONNECTION_TIMEOUT);
|
||||
s.setDefaultMaxConnectionsPerHost(100);
|
||||
s.setMaxTotalConnections(100);
|
||||
return s;
|
||||
|
|
|
@ -76,6 +76,8 @@ import org.xml.sax.SAXException;
|
|||
*
|
||||
*/
|
||||
public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
||||
public static int DEFAULT_CONNECTION_TIMEOUT = 500; // default socket connection timeout in ms
|
||||
|
||||
|
||||
@ClassRule
|
||||
public static TestRule solrClassRules =
|
||||
|
|
Loading…
Reference in New Issue