epugh commented on code in PR #1211:
URL: https://github.com/apache/solr/pull/1211#discussion_r1039737488
##########
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:
thanks for calling this out. With fresh eyes, I realized, the test was
failing PROPERLY, as the code wasn't right... So I fixed it finally. Phew,
it would have been an annoying bug.
--
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]