SOLR-18188: RestTestHarness overhaul, add URLUtil.buildURI#4270
Merged
dsmiley merged 4 commits intoapache:mainfrom Apr 12, 2026
Merged
SOLR-18188: RestTestHarness overhaul, add URLUtil.buildURI#4270dsmiley merged 4 commits intoapache:mainfrom
dsmiley merged 4 commits intoapache:mainfrom
Conversation
…til.buildURI Refactors RestTestHarness to be immutable and use Jetty HttpClient directly instead of Apache HttpClient. Introduces URLUtil.buildURI helper. Updates all callers across test-framework, core, solrj, ltr, and language-models modules. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dsmiley
commented
Apr 7, 2026
| * Creates a REST client useful for HTTP operations. It closes when this {@link JettySolrRunner} | ||
| * is stopped. | ||
| */ | ||
| public RestTestHarness getRestClient(String collection) { |
Contributor
Author
There was a problem hiding this comment.
I chose this name "getRestClient" as I think it's a better characterization of what RestTestHarness is.
| * calling getJetty().stop()/start() directly. | ||
| */ | ||
| protected static void restartJetty() throws Exception { | ||
| getJetty().stop(); |
Contributor
Author
There was a problem hiding this comment.
I wish I could prevent subclasses from reaching into Jetty to start/stop it, forcing them to use this method. Ah well.
Contributor
Author
|
I'll merge Sunday if I don't hear anything more. |
# Conflicts: # solr/test-framework/src/java/org/apache/solr/util/RestTestBase.java
dsmiley
added a commit
that referenced
this pull request
Apr 18, 2026
Refactors RestTestHarness to be immutable and use Jetty HttpClient instead of Apache HttpClient. Introduces URLUtil.buildURI helper, used by RestTestHarness and a backup test. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.