Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion solr/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,6 @@ dependencies {
exclude group: "net.bytebuddy", module: "byte-buddy-agent"
})
testImplementation libs.apache.httpcomponents.httpclient
testImplementation libs.apache.httpcomponents.httpcore

testImplementation libs.opentelemetry.sdk.testing
testImplementation libs.dropwizard.metrics.core
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ public void before() throws Exception {
@After
public void after() throws Exception {
solrTestRule.reset();

if (restTestHarness != null) {
restTestHarness.close();
}
restTestHarness = null;
}

@Test
Expand Down
4 changes: 0 additions & 4 deletions solr/core/src/test/org/apache/solr/core/TestCustomStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,14 @@ public void testDynamicLoadingCustomStream() throws Exception {
TestSolrConfigHandler.runConfigCommand(client, "/config", payload);
TestSolrConfigHandler.testForResponseElement(
client,
null,
"/config/overlay",
null,
Arrays.asList("overlay", "expressible", "hello", "class"),
"org.apache.solr.core.HelloStream",
10);

TestSolrConfigHandler.testForResponseElement(
client,
null,
"/stream?expr=hello()",
null,
Arrays.asList("result-set", "docs[0]", "msg"),
"Hello World!",
10);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -290,15 +290,13 @@ private static void processAndAssertSuccess(final CollectionAdminRequest.Create
private static void setUserProperties(
final String collectionName, final Map<String, String> props) throws Exception {

try (RestTestHarness harness = makeRestHarness(collectionName)) {
final String cmd =
"{ 'set-user-property' : { "
+ props.entrySet().stream()
.map(e -> "'" + e.getKey() + "':'" + e.getValue() + "'")
.collect(Collectors.joining(","))
+ "}} ";
runConfigCommand(harness, cmd);
}
final String cmd =
"{ 'set-user-property' : { "
+ props.entrySet().stream()
.map(e -> "'" + e.getKey() + "':'" + e.getValue() + "'")
.collect(Collectors.joining(","))
+ "}} ";
runConfigCommand(makeRestHarness(collectionName), cmd);
}

/**
Expand Down Expand Up @@ -345,8 +343,7 @@ public void postClose(SolrCore core) {
}

private static RestTestHarness makeRestHarness(final String collectionName) {
return new RestTestHarness(
() -> cluster.getRandomJetty(random()).getBaseUrl().toString() + "/" + collectionName);
return cluster.getRandomJetty(random()).getRestClient(collectionName);
}

private static void runConfigCommand(RestTestHarness harness, String json) throws IOException {
Expand Down
Loading
Loading