risdenk commented on code in PR #1158:
URL: https://github.com/apache/solr/pull/1158#discussion_r1033664796
##########
solr/core/src/test/org/apache/solr/search/TestSmileRequest.java:
##########
@@ -91,7 +90,6 @@ public void assertJQ(SolrClient client, SolrParams args,
String... tests)
// adding this to core adds the dependency on a few extra jars to our
distribution.
// So this is not added there
public static class SmileResponseParser extends BinaryResponseParser {
- public static final SmileResponseParser inst = new SmileResponseParser();
Review Comment:
you can probably revert this line change and set the query response parser
to `SmileResponseParser.inst`
##########
solr/solrj/src/test/org/apache/solr/client/solrj/impl/BasicHttpSolrClientTest.java:
##########
@@ -476,9 +484,20 @@ public void testUpdate() throws Exception {
// parameter encoding
assertEquals(1, DebugServlet.parameters.get("a").length);
assertEquals("\u1234", DebugServlet.parameters.get("a")[0]);
+ }
+ DebugServlet.clear();
+ // XML response and writer
+ try (HttpSolrClient client =
+ new HttpSolrClient.Builder(url)
+ .withRequestWriter(new RequestWriter())
+ .withResponseParser(new XMLResponseParser())
+ .build()) {
+ UpdateRequest req = new UpdateRequest();
+ req.add(new SolrInputDocument());
+ req.setParam("a", "\u1234");
- // XML response and writer
- client.setParser(new XMLResponseParser());
+ // Have not been able to move this to the Builder pattern, the below
check for application/xml
+ // always returns as application/javabin when .setRequestWriter() is
commented out.
Review Comment:
Was this ever looked at again?
##########
solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientTest.java:
##########
@@ -379,7 +378,7 @@ public void testQuery() throws Exception {
assertEquals(EXPECTED_USER_AGENT,
DebugServlet.headers.get("user-agent"));
assertEquals("application/x-www-form-urlencoded",
DebugServlet.headers.get("content-type"));
- client.setParser(new XMLResponseParser());
+ // client.setParser(new XMLResponseParser());
Review Comment:
looks like this wasn't removed yet
##########
solr/solrj/src/test/org/apache/solr/client/solrj/impl/Http2SolrClientTest.java:
##########
@@ -360,7 +359,7 @@ public void testQuery() throws Exception {
assertEquals(EXPECTED_USER_AGENT,
DebugServlet.headers.get("user-agent"));
// XML/POST
- client.setParser(new XMLResponseParser());
+ // client.setParser(new XMLResponseParser());
Review Comment:
looks like this wasn't removed yet
--
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]