colvinco commented on a change in pull request #723: SOLR-13545: AutoClose
stream in ContentStreamUpdateRequest
URL: https://github.com/apache/lucene-solr/pull/723#discussion_r295956308
##########
File path:
solr/solrj/src/test/org/apache/solr/client/solrj/SolrExampleTests.java
##########
@@ -724,10 +736,18 @@ public void testStreamingRequest() throws Exception {
client.commit();
QueryResponse rsp = client.query( new SolrQuery( "*:*") );
Assert.assertEquals(0, rsp.getResults().getNumFound());
+ // Create a copy of the file, which can be deleted after uploading.
+ // If the stream isn't closed, the file deletion will fail on Windows,
+ // though it will succeed on linux regardless
Review comment:
Yes it is. While that can be done for the ContentSteamUpdateRequest, it
can't be done for StreamingUpdateRequest without changing the class itself to
expose the creation of the steam that it uses... And I didn't want to just go
and do that. And it seemed logical to add a test for it, and to use the same
logic for both, since they could both suffer from the same problem if changed
in the future.
I could refactor both to use something common to stream and close, which
would be more easily unit testable?
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]