epugh commented on code in PR #1211:
URL: https://github.com/apache/solr/pull/1211#discussion_r1039702040
##########
solr/solrj/src/test/org/apache/solr/client/solrj/TestBatchUpdate.java:
##########
@@ -46,61 +46,68 @@ public static void beforeTest() throws Exception {
@Test
public void testWithXml() throws Exception {
- HttpSolrClient client = (HttpSolrClient) getSolrClient();
- client.setRequestWriter(new RequestWriter());
- client.deleteByQuery("*:*"); // delete everything!
- doIt(client);
+ try (SolrClient client =
+ new HttpSolrClient.Builder(getServerUrl()).withRequestWriter(new
RequestWriter()).build()) {
+ client.deleteByQuery("*:*"); // delete everything!
+ doIt(client);
+ }
Review Comment:
i think this method, if you look at the others, is being explicit...
testWithXML is the method name, and so it's demosntrating that REquestWriter is
the XML requestwriter... We moved all of these to using try/with pattern as
well..
DOes that make sense?
--
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]