You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ro...@apache.org on 2026/03/09 10:14:59 UTC
(lucene) branch branch_10x updated: Exclude JNA Cleaner thread from ThreadLeak detection (#15799)
This is an automated email from the ASF dual-hosted git repository.
romseygeek pushed a commit to branch branch_10x
in repository https://gitbox.apache.org/repos/asf/lucene.git
The following commit(s) were added to refs/heads/branch_10x by this push:
new b5a990a6e9c Exclude JNA Cleaner thread from ThreadLeak detection (#15799)
b5a990a6e9c is described below
commit b5a990a6e9c510cd215db3df3c25cf9f112958ac
Author: Alan Woodward <ro...@apache.org>
AuthorDate: Mon Mar 9 10:10:02 2026 +0000
Exclude JNA Cleaner thread from ThreadLeak detection (#15799)
JNA Cleaner is a static per-JVM thread that may start up during the
execution of a test if JNA is being used elsewhere in the test suite,
and shouldn't be considered as a leak from any individual test.
---
lucene/CHANGES.txt | 2 ++
.../java/org/apache/lucene/tests/util/QuickPatchThreadsFilter.java | 4 +++-
2 files changed, 5 insertions(+), 1 deletion(-)
diff --git a/lucene/CHANGES.txt b/lucene/CHANGES.txt
index 6a91eb3c3b2..8f7b5c869f4 100644
--- a/lucene/CHANGES.txt
+++ b/lucene/CHANGES.txt
@@ -75,6 +75,8 @@ Other
* GITHUB#15783: Refactor QuantizedVectorsReader to be able to access lucene 104 quantized values through this API.
(Ignacio Vera)
+* GITHUB#15799: Exclude JNA Cleaner from thread leak detection by LuceneTestCase. (Alan Woodward)
+
======================= Lucene 10.4.0 =======================
API Changes
diff --git a/lucene/test-framework/src/java/org/apache/lucene/tests/util/QuickPatchThreadsFilter.java b/lucene/test-framework/src/java/org/apache/lucene/tests/util/QuickPatchThreadsFilter.java
index c3072c43446..42dbe4a1c02 100644
--- a/lucene/test-framework/src/java/org/apache/lucene/tests/util/QuickPatchThreadsFilter.java
+++ b/lucene/test-framework/src/java/org/apache/lucene/tests/util/QuickPatchThreadsFilter.java
@@ -52,6 +52,8 @@ public class QuickPatchThreadsFilter implements ThreadFilter {
return true;
}
- return false;
+ // Also filter out JNA Cleaner threads, which is static per-JVM and not under the
+ // control of a test suite.
+ return t.getName().equals("JNA Cleaner");
}
}