diff --git a/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java b/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java index 45717ded9d4..94bf50c5e8a 100644 --- a/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java +++ b/solr/core/src/test/org/apache/solr/core/TestCoreContainer.java @@ -130,6 +130,8 @@ public class TestCoreContainer extends SolrTestCaseJ4 { FileUtils.contentEquals(threeXml, fourXml)); } finally { + // y is closed by the container, but + // x has been removed from the container if (x != null) { try { x.close(); @@ -137,13 +139,6 @@ public class TestCoreContainer extends SolrTestCaseJ4 { log.error("", e); } } - if (y != null) { - try { - y.close(); - } catch (Exception e) { - log.error("", e); - } - } } }