Skip to content

Apache Lucene open-source search software

ensure test closes the infoStream it opens

Chris M. Hostetter1cd1d47d3767
diff --git a/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java b/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java
index fe08f53c364..543b6485bcc 100644
--- a/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java
+++ b/solr/core/src/test/org/apache/solr/core/TestSolrIndexConfig.java
@@ -48,8 +48,11 @@ public class TestSolrIndexConfig extends SolrTestCaseJ4 {
public void testIndexConfigParsing() throws Exception {
IndexWriterConfig iwc = solrConfig.indexConfig.toIndexWriterConfig(h.getCore().getLatestSchema());
-
- checkIndexWriterConfig(iwc);
+ try {
+ checkIndexWriterConfig(iwc);
+ } finally {
+ iwc.getInfoStream().close();
+ }
}
private void checkIndexWriterConfig(LiveIndexWriterConfig iwc) {