You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@solr.apache.org by kr...@apache.org on 2022/09/06 15:42:51 UTC

[solr] branch branch_9x updated: SOLR-16401: Test thread leak linger should be 1s (#997)

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

krisden pushed a commit to branch branch_9x
in repository https://gitbox.apache.org/repos/asf/solr.git


The following commit(s) were added to refs/heads/branch_9x by this push:
     new 5fca7b332b8 SOLR-16401: Test thread leak linger should be 1s (#997)
5fca7b332b8 is described below

commit 5fca7b332b897ca79d6d80058c95ff450ef3d895
Author: Kevin Risden <ri...@users.noreply.github.com>
AuthorDate: Tue Sep 6 11:40:31 2022 -0400

    SOLR-16401: Test thread leak linger should be 1s (#997)
---
 solr/test-framework/src/java/org/apache/solr/SolrTestCase.java | 6 +++++-
 1 file changed, 5 insertions(+), 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 4d7a02507db..15ea14f58ce 100644
--- a/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
+++ b/solr/test-framework/src/java/org/apache/solr/SolrTestCase.java
@@ -59,7 +59,11 @@ import org.slf4j.LoggerFactory;
 @ThreadLeakFilters(
     defaultFilters = true,
     filters = {SolrIgnoredThreadsFilter.class, QuickPatchThreadsFilter.class})
-@ThreadLeakLingering(linger = 0)
+// The ThreadLeakLingering is set to 1s to allow ThreadPools to finish
+// joining on termination. Ideally this should only be 10-100ms, but
+// on slow machines it could take up to 1s. See discussion on SOLR-15660
+// and SOLR-16187 regarding why this is necessary.
+@ThreadLeakLingering(linger = 1000)
 public class SolrTestCase extends LuceneTestCase {
 
   private static final Logger log = LoggerFactory.getLogger(MethodHandles.lookup().lookupClass());