mirror of https://github.com/apache/lucene.git
SOLR-844: fix check interval to be milliseconds
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@818239 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ea3dfb40f1
commit
b2d254b746
|
@ -286,7 +286,7 @@ public class LBHttpSolrServer extends SolrServer {
|
|||
aliveCheckExecutor = Executors.newSingleThreadScheduledExecutor();
|
||||
aliveCheckExecutor.scheduleAtFixedRate(
|
||||
getAliveCheckRunner(new WeakReference<LBHttpSolrServer>(this)),
|
||||
this.interval, this.interval, TimeUnit.SECONDS);
|
||||
this.interval, this.interval, TimeUnit.MILLISECONDS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,7 +83,7 @@ public class TestLBHttpSolrServer extends TestCase {
|
|||
s[i] = solr[i].getUrl();
|
||||
}
|
||||
LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer(httpClient, s);
|
||||
lbHttpSolrServer.setAliveCheckInterval(1);
|
||||
lbHttpSolrServer.setAliveCheckInterval(1000);
|
||||
SolrQuery solrQuery = new SolrQuery("*:*");
|
||||
Set<String> names = new HashSet<String>();
|
||||
QueryResponse resp = null;
|
||||
|
@ -121,7 +121,7 @@ public class TestLBHttpSolrServer extends TestCase {
|
|||
|
||||
public void testTwoServers() throws Exception {
|
||||
LBHttpSolrServer lbHttpSolrServer = new LBHttpSolrServer(httpClient, solr[0].getUrl(), solr[1].getUrl());
|
||||
lbHttpSolrServer.setAliveCheckInterval(1);
|
||||
lbHttpSolrServer.setAliveCheckInterval(1000);
|
||||
SolrQuery solrQuery = new SolrQuery("*:*");
|
||||
Set<String> names = new HashSet<String>();
|
||||
QueryResponse resp = null;
|
||||
|
|
Loading…
Reference in New Issue