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:
Yonik Seeley 2012-03-29 21:39:30 +00:00
parent 13745b230d
commit 6209a4123b
7 changed files with 9 additions and 6 deletions

View File

@ -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;

View File

@ -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);

View File

@ -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);

View File

@ -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;

View File

@ -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;

View File

@ -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;

View File

@ -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 =