AndreyBozhko commented on code in PR #2707:
URL: https://github.com/apache/solr/pull/2707#discussion_r1777421365
##########
solr/test-framework/src/java/org/apache/solr/cloud/AbstractFullDistribZkTestBase.java:
##########
@@ -1981,29 +1981,18 @@ protected void destroyServers() throws Exception {
ExecutorService customThreadPool =
ExecutorUtil.newMDCAwareCachedThreadPool(new
SolrNamedThreadFactory("closeThreadPool"));
- customThreadPool.submit(() -> IOUtils.closeQuietly(commonCloudSolrClient));
+ customThreadPool.execute(() ->
IOUtils.closeQuietly(commonCloudSolrClient));
- customThreadPool.submit(() -> IOUtils.closeQuietly(controlClient));
+ customThreadPool.execute(() -> IOUtils.closeQuietly(controlClient));
- customThreadPool.submit(
- () ->
- coreClients.parallelStream()
- .forEach(
- c -> {
- IOUtils.closeQuietly(c);
- }));
+ customThreadPool.execute(() ->
coreClients.parallelStream().forEach(IOUtils::closeQuietly));
Review Comment:
Good point - even though this uses IOUtils#closeQuietly to avoid propagating
the exception, it does make sense to be consistent about the usage of
parallelStream.
--
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]