You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@solr.apache.org by "dsmiley (via GitHub)" <gi...@apache.org> on 2026/04/07 20:57:25 UTC

[PR] SOLR-18188: RestTestHarness overhaul, add URLUtil.buildURI [solr]

dsmiley opened a new pull request, #4270:
URL: https://github.com/apache/solr/pull/4270

   Refactors RestTestHarness to be immutable and use Jetty HttpClient directly instead of Apache HttpClient. Introduces URLUtil.buildURI helper, used by RestTestHarness and a backup test.
   
   I recommend starting viewing this from URLUtil, then test-framework, and then tests generally.
   
   https://issues.apache.org/jira/browse/SOLR-18188
   
   This was split off from #4266 so already got some review.


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-18188: RestTestHarness overhaul, add URLUtil.buildURI [solr]

Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley merged PR #4270:
URL: https://github.com/apache/solr/pull/4270


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-18188: RestTestHarness overhaul, add URLUtil.buildURI [solr]

Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
dsmiley commented on PR #4270:
URL: https://github.com/apache/solr/pull/4270#issuecomment-4226880060

   I'll merge Sunday if I don't hear anything more.


-- 
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org


Re: [PR] SOLR-18188: RestTestHarness overhaul, add URLUtil.buildURI [solr]

Posted by "dsmiley (via GitHub)" <gi...@apache.org>.
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: issues-unsubscribe@solr.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@solr.apache.org
For additional commands, e-mail: issues-help@solr.apache.org