epugh commented on code in PR #1211:
URL: https://github.com/apache/solr/pull/1211#discussion_r1039715151


##########
solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java:
##########
@@ -2871,10 +2871,30 @@ public static LBHttpSolrClient 
getLBHttpSolrClient(String... solrUrls)
     return new LBHttpSolrClient.Builder().withBaseSolrUrls(solrUrls).build();
   }
 
+  /** This method creates a HttpClient from a URL. */
+  public static HttpClient getHttpClient(String url) {
+    return new HttpSolrClient.Builder(url).build().getHttpClient();
+  }
+
   /**
-   * This method <i>may</i> randomize unspecified aspects of the resulting 
SolrClient. Tests that do
-   * not wish to have any randomized behavior should use the {@link
-   * org.apache.solr.client.solrj.impl.HttpSolrClient.Builder} class directly
+   * This method creates a basic HttpSolrClient. Tests that want to control 
the creation process
+   * should use the {@link 
org.apache.solr.client.solrj.impl.HttpSolrClient.Builder} class directly
+   */
+  public static HttpSolrClient getHttp1SolrClient(String url) {
+    return new HttpSolrClient.Builder(url).build();
+  }
+
+  /**
+   * This method creates a basic Http2SolrClient. Tests that want to control 
the creation process

Review Comment:
   I checked, and a LOT of these methods are used by 1 test class...   In the 
next PR, I'd like to just remove these not very much used at all helper 
methods.  I think they are more confusing to the the test author then 
helpful....



-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to