Skip to content

Commit

Permalink
[improve][ci] Ignore Testcontainers background threads in ThreadLeakD…
Browse files Browse the repository at this point in the history
…etectorListener (#21472)
  • Loading branch information
lhotari authored Oct 30, 2023
1 parent 3519fa0 commit bc84721
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ private static boolean shouldSkipThread(Thread thread) {
if (thread instanceof ForkJoinWorkerThread) {
return true;
}
// skip Testcontainers threads
if (thread.getThreadGroup() != null && "testcontainers".equals(thread.getThreadGroup().getName())) {
return true;
}
String threadName = thread.getName();
if (threadName != null) {
// skip ClientTestFixtures.SCHEDULER threads
Expand All @@ -189,6 +193,14 @@ private static boolean shouldSkipThread(Thread thread) {
if (threadName.equals("OkHttp TaskRunner")) {
return true;
}
// skip JNA background thread
if (threadName.equals("JNA Cleaner")) {
return true;
}
// skip org.glassfish.grizzly.http.server.DefaultSessionManager thread pool
if (threadName.equals("Grizzly-HttpSession-Expirer")) {
return true;
}
}
return false;
}
Expand Down

0 comments on commit bc84721

Please sign in to comment.