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:
Alan Woodward 2015-01-28 15:35:31 +00:00
parent a28edac7a9
commit 06287f52ad
1 changed files with 3 additions and 3 deletions

View File

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