Skip to content

armgit / solr

Public Imported from GitHub
0

Apache Solr open-source search software

SOLR-16401: Test thread leak linger should be 1s (#997)

Kevin Risden2aa8dbf0bf7e
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());