You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2015/01/28 16:36:33 UTC

svn commit: r1655363 - /lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java

Author: romseygeek
Date: Wed Jan 28 15:36:33 2015
New Revision: 1655363

URL: http://svn.apache.org/r1655363
Log:
Fix test to take SSL config into account

Modified:
    lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java

Modified: lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java?rev=1655363&r1=1655362&r2=1655363&view=diff
==============================================================================
--- lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java (original)
+++ lucene/dev/branches/branch_5x/solr/core/src/test/org/apache/solr/handler/admin/CoreAdminHandlerTest.java Wed Jan 28 15:36:33 2015
@@ -200,10 +200,10 @@ public class CoreAdminHandlerTest extend
     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 extend
       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);