From 06287f52ad3b3b0c7c7dc21c367d912b51f97c53 Mon Sep 17 00:00:00 2001 From: Alan Woodward Date: Wed, 28 Jan 2015 15:35:31 +0000 Subject: [PATCH] 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 --- .../org/apache/solr/handler/admin/CoreAdminHandlerTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java b/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java index 58d7b76b0e0..41b02a121b3 100644 --- a/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java +++ b/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java @@ -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);