epugh commented on code in PR #3708:
URL: https://github.com/apache/solr/pull/3708#discussion_r2635737437
##########
solr/test-framework/src/java/org/apache/solr/SolrTestCaseHS.java:
##########
@@ -190,9 +190,23 @@ public static String getQueryResponse(String wt,
SolrParams params) throws Excep
p.remove("qt");
p.set("indent", "true");
- DirectSolrConnection connection = new DirectSolrConnection(h.getCore());
- String raw = connection.request(path, p, null);
- return raw;
+ try (EmbeddedSolrServer server =
+ new EmbeddedSolrServer(h.getCoreContainer(), h.getCore().getName())) {
+ QueryRequest query = new QueryRequest(p);
+ if (path != null) {
+ query.setPath(path);
+ }
+
+ if ("json".equals(wt)) {
+ query.setResponseParser(new JsonMapResponseParser());
+ NamedList<Object> rsp = server.request(query);
+ return Utils.toJSONString(rsp);
+ } else {
+ query.setResponseParser(new InputStreamResponseParser(wt));
Review Comment:
holy smokes it did..
--
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]