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/07/21 01:32:23 UTC

[lucene-solr] branch reference_impl updated: @264 Just work around for a bit.

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

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


The following commit(s) were added to refs/heads/reference_impl by this push:
     new 071e8e5  @264 Just work around for a bit.
071e8e5 is described below

commit 071e8e5c06b49ef38761bf933dbce1fe6b1b78c3
Author: markrmiller@gmail.com <ma...@gmail.com>
AuthorDate: Mon Jul 20 20:32:10 2020 -0500

    @264 Just work around for a bit.
---
 solr/test-framework/src/java/org/apache/solr/SolrTestCase.java | 10 ++++++----
 .../src/java/org/apache/solr/SolrTestCaseJ4.java               |  1 +
 2 files changed, 7 insertions(+), 4 deletions(-)

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 ec66f4d..6a08690 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
@@ -472,7 +472,7 @@ public class SolrTestCase extends LuceneTestCase {
     try {
       String interruptThread = interuptThreadWithNameContains;
       if (interruptThread != null) {
-        interruptThreadsOnTearDown(interruptThread, true);
+        interruptThreadsOnTearDown(null, true);
         interuptThreadWithNameContains = null;
       }
     } catch (Exception e) {
@@ -492,15 +492,16 @@ public class SolrTestCase extends LuceneTestCase {
     System.out.println("DO FORCED INTTERUPTS");
     //  we need to filter and only do this for known threads? dont want users to count on this behavior unless necessary
     String testThread = Thread.currentThread().getName();
-    //System.out.println("test thread:" + testThread);
+    System.out.println("test thread:" + testThread);
     ThreadGroup tg = Thread.currentThread().getThreadGroup();
-    //System.out.println("test group:" + tg.getName());
+    System.out.println("test group:" + tg.getName());
     Set<Map.Entry<Thread,StackTraceElement[]>> threadSet = Thread.getAllStackTraces().entrySet();
-    //System.out.println("thread count: " + threadSet.size());
+    System.out.println("thread count: " + threadSet.size());
     for (Map.Entry<Thread,StackTraceElement[]> threadEntry : threadSet) {
       Thread thread = threadEntry.getKey();
       ThreadGroup threadGroup = thread.getThreadGroup();
       if (threadGroup != null) {
+        System.out.println("thread is " + thread.getName());
         if (threadGroup.getName().equals(tg.getName()) && !thread.getName().startsWith("SUITE") && !thread.getName().startsWith("Log4j2")) {
           interrupt(thread, nameContains);
           continue;
@@ -510,6 +511,7 @@ public class SolrTestCase extends LuceneTestCase {
       while (threadGroup != null && threadGroup.getParent() != null && !thread.getName().startsWith("SUITE") && !thread.getName().startsWith("Log4j2")) {
         threadGroup = threadGroup.getParent();
         if (threadGroup.getName().equals(tg.getName())) {
+          System.out.println("thread is " + thread.getName());
           interrupt(thread, nameContains);
           continue;
         }
diff --git a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
index 8651a38..4775fe4 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCaseJ4.java
@@ -2960,6 +2960,7 @@ public abstract class SolrTestCaseJ4 extends SolrTestCase {
           qtp.setStopTimeout((int) TimeUnit.SECONDS.toMillis(30));
           qtp.setReservedThreads(-1); // -1 auto sizes, important to keep
           // qtp.setStopTimeout((int) TimeUnit.MINUTES.toMillis(1));
+          interruptThreadsOnTearDown("ParWork", false);
     return qtp;
   }
 }