mirror of https://github.com/apache/lucene.git
Fix test to take SSL config into account
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1655362 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
a28edac7a9
commit
06287f52ad
|
@ -200,10 +200,10 @@ public class CoreAdminHandlerTest extends SolrTestCaseJ4 {
|
|||
copySolrHomeToTemp(solrHomeDirectory, "corex", true);
|
||||
File corex = new File(solrHomeDirectory, "corex");
|
||||
FileUtils.write(new File(corex, "core.properties"), "", Charsets.UTF_8.toString());
|
||||
JettySolrRunner runner = new JettySolrRunner(solrHomeDirectory.getAbsolutePath(), "/solr", 0);
|
||||
JettySolrRunner runner = new JettySolrRunner(solrHomeDirectory.getAbsolutePath(), "/solr", 0, null, null, true, null, sslConfig);
|
||||
runner.start();
|
||||
|
||||
try (HttpSolrClient client = new HttpSolrClient("http://localhost:" + runner.getLocalPort() + "/solr/corex")) {
|
||||
try (HttpSolrClient client = new HttpSolrClient(runner.getBaseUrl() + "/corex")) {
|
||||
client.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
|
||||
client.setSoTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
|
||||
SolrInputDocument doc = new SolrInputDocument();
|
||||
|
@ -212,7 +212,7 @@ public class CoreAdminHandlerTest extends SolrTestCaseJ4 {
|
|||
client.commit();
|
||||
}
|
||||
|
||||
try (HttpSolrClient client = new HttpSolrClient("http://localhost:" + runner.getLocalPort() + "/solr")) {
|
||||
try (HttpSolrClient client = new HttpSolrClient(runner.getBaseUrl().toString())) {
|
||||
client.setConnectionTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
|
||||
client.setSoTimeout(SolrTestCaseJ4.DEFAULT_CONNECTION_TIMEOUT);
|
||||
CoreAdminRequest.Unload req = new CoreAdminRequest.Unload(false);
|
||||
|
|
Loading…
Reference in New Issue