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/02 18:38:08 UTC

[lucene-solr] branch reference_impl_dev updated: @713 Always try and deal with TERMINATED threads.

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 4267a4c  @713 Always try and deal with TERMINATED threads.
4267a4c is described below

commit 4267a4c44ce55e0a480c5e3bd4f88880e7631307
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Wed Sep 2 13:37:28 2020 -0500

    @713 Always try and deal with TERMINATED threads.
---
 solr/test-framework/src/java/org/apache/solr/SolrTestCase.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
index cf89ea1..00c8153 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
@@ -579,7 +579,7 @@ public class SolrTestCase extends LuceneTestCase {
 
       while (threadGroup != null && threadGroup.getParent() != null && !thread.getName().startsWith("SUITE")) {
         threadGroup = threadGroup.getParent();
-        if (nameContains != null && threadGroup.getName().equals(tg.getName())) {
+        if (thread.getState().equals(Thread.State.TERMINATED) || nameContains != null && threadGroup.getName().equals(tg.getName())) {
         //  System.out.println("thread is " + thread.getName());
           interrupt(thread, nameContains);
           continue;