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(); }