From 5e159c36736ba8e5db70c290a2a891d38f8710a1 Mon Sep 17 00:00:00 2001 From: Eric Pugh Date: Wed, 31 Dec 2025 12:27:49 -0500 Subject: [PATCH] Restore the explicit closes on solr clients to prevent resource starvation when running tests many times --- .../component/DistributedDebugComponentTest.java | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java b/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java index 75b4de3ffd4..df2dcfbede4 100644 --- a/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java +++ b/solr/core/src/test/org/apache/solr/handler/component/DistributedDebugComponentTest.java @@ -87,9 +87,15 @@ public static void createThings() throws Exception { } @AfterClass - public static void destroyThings() { - collection1 = null; - collection2 = null; + public static void destroyThings() throws IOException { + if (collection1 != null) { + collection1.close(); + collection1 = null; + } + if (collection2 != null) { + collection2.close(); + collection2 = null; + } resetExceptionIgnores(); systemClearPropertySolrEnableUrlAllowList(); }