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:
Yonik Seeley 2009-09-23 20:26:44 +00:00
parent ea3dfb40f1
commit b2d254b746
2 changed files with 3 additions and 3 deletions

View File

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

View File

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