thomaswoeckinger commented on a change in pull request #665: Fixes SOLR-13539
URL: https://github.com/apache/lucene-solr/pull/665#discussion_r296456996
 
 

 ##########
 File path: solr/test-framework/src/java/org/apache/solr/SolrJettyTestBase.java
 ##########
 @@ -140,29 +139,17 @@ public synchronized SolrClient getSolrClient() {
   }
 
   /**
-   * Create a new solr client.
-   * If createJetty was called, an http implementation will be created,
-   * otherwise an embedded implementation will be created.
-   * Subclasses should override for other options.
+   * Create a new solr client. If createJetty was called, an http 
implementation will be created, otherwise an embedded
+   * implementation will be created. Subclasses should override for other 
options.
    */
   public SolrClient createNewSolrClient() {
-    if (jetty != null) {
-      try {
-        // setup the client...
-        String url = jetty.getBaseUrl().toString() + "/" + "collection1";
-        HttpSolrClient client = getHttpSolrClient(url, 
DEFAULT_CONNECTION_TIMEOUT);
-        return client;
-      }
-      catch( Exception ex ) {
-        throw new RuntimeException( ex );
-      }
-    } else {
-      return new EmbeddedSolrServer( h.getCoreContainer(), "collection1" ) {
-        @Override
-        public void close() {
-          // do not close core container
-        }
-      };
+    try {
+      // setup the client...
+      final String url = jetty.getBaseUrl().toString() + "/" + "collection1";
+      final HttpSolrClient client = getHttpSolrClient(url, 
DEFAULT_CONNECTION_TIMEOUT);
+      return client;
+    } catch (final Exception ex) {
+      throw new RuntimeException(ex);
 
 Review comment:
   See comments above

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to