You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ma...@apache.org on 2020/09/01 17:47:38 UTC

[lucene-solr] branch reference_impl_dev updated: @673 Try to fix test thread leak in processExit of thread pool.

This is an automated email from the ASF dual-hosted git repository.

markrmiller pushed a commit to branch reference_impl_dev
in repository https://gitbox.apache.org/repos/asf/lucene-solr.git


The following commit(s) were added to refs/heads/reference_impl_dev by this push:
     new 0de54d9  @673 Try to fix test thread leak in processExit of thread pool.
0de54d9 is described below

commit 0de54d93703763fb53b00bf7f7c3a16baa80461c
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Tue Sep 1 12:47:19 2020 -0500

    @673 Try to fix test thread leak in processExit of thread pool.
---
 .../src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java | 1 +
 solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java       | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
index 7a9f7b5..84137cc 100644
--- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
+++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/BaseCloudSolrClient.java
@@ -258,6 +258,7 @@ public abstract class BaseCloudSolrClient extends SolrClient {
 
   @Override
   public void close() throws IOException {
+    threadPool.shutdownNow();
     ExecutorUtil.shutdownAndAwaitTermination(threadPool);
   }
 
diff --git a/solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java b/solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java
index 0af78c4..9c1565b 100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/ExecutorUtil.java
@@ -91,7 +91,7 @@ public class ExecutorUtil {
 
       try {
         // Wait a while for existing tasks to terminate
-        shutdown = pool.awaitTermination(30, TimeUnit.SECONDS);
+        shutdown = pool.awaitTermination(10, TimeUnit.SECONDS);
       } catch (InterruptedException ie) {
         interrupted = true;
         if (interruptTimeout.hasTimedOut()) {