mirror of https://github.com/apache/lucene.git
SOLR-10166: TestLBHttpSolrClient needs to be hardened.
This commit is contained in:
parent
5fb94cee68
commit
9ca3d57b2b
|
@ -207,8 +207,8 @@ public class TestLBHttpSolrClient extends SolrTestCaseJ4 {
|
||||||
CloseableHttpClient myHttpClient = HttpClientUtil.createClient(null);
|
CloseableHttpClient myHttpClient = HttpClientUtil.createClient(null);
|
||||||
try {
|
try {
|
||||||
LBHttpSolrClient client = getLBHttpSolrClient(myHttpClient, s);
|
LBHttpSolrClient client = getLBHttpSolrClient(myHttpClient, s);
|
||||||
client.setConnectionTimeout(250);
|
client.setConnectionTimeout(500);
|
||||||
client.setSoTimeout(250);
|
client.setSoTimeout(500);
|
||||||
client.setAliveCheckInterval(500);
|
client.setAliveCheckInterval(500);
|
||||||
|
|
||||||
// Kill a server and test again
|
// Kill a server and test again
|
||||||
|
@ -242,6 +242,8 @@ public class TestLBHttpSolrClient extends SolrTestCaseJ4 {
|
||||||
String name = resp.getResults().get(0).getFieldValue("name").toString();
|
String name = resp.getResults().get(0).getFieldValue("name").toString();
|
||||||
if (name.equals(serverName))
|
if (name.equals(serverName))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
Thread.sleep(500);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue