dsmiley commented on code in PR #4270:
URL: https://github.com/apache/solr/pull/4270#discussion_r3047908055


##########
solr/test-framework/src/java/org/apache/solr/util/RestTestBase.java:
##########
@@ -120,6 +115,16 @@ protected static JettySolrRunner getJetty() {
     return solrTestRule.getJetty();
   }
 
+  /**
+   * Restarts Jetty and recreates the RestTestHarness with a new HttpClient. 
Use this instead of
+   * calling getJetty().stop()/start() directly.
+   */
+  protected static void restartJetty() throws Exception {
+    getJetty().stop();

Review Comment:
   I wish I could prevent subclasses from reaching into Jetty to start/stop it, 
forcing them to use this method. Ah well.



##########
solr/test-framework/src/java/org/apache/solr/embedded/JettySolrRunner.java:
##########
@@ -907,6 +916,18 @@ public SocketProxy getProxy() {
     return proxy;
   }
 
+  /**
+   * Creates a REST client useful for HTTP operations. It closes when this 
{@link JettySolrRunner}
+   * is stopped.
+   */
+  public RestTestHarness getRestClient(String collection) {

Review Comment:
   I chose this name "getRestClient" as I think it's a better characterization 
of what RestTestHarness is.



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