diff --git a/solr/src/test/org/apache/solr/core/TestConfig.java b/solr/src/test/org/apache/solr/core/TestConfig.java index efc9dcfc79f..5781de094ce 100644 --- a/solr/src/test/org/apache/solr/core/TestConfig.java +++ b/solr/src/test/org/apache/solr/core/TestConfig.java @@ -130,10 +130,12 @@ public class TestConfig extends SolrTestCaseJ4 { return writer; } } - - IndexWriter writer = new ExposeWriterHandler().getWriter(); + + ExposeWriterHandler duh = new ExposeWriterHandler(); + IndexWriter writer = duh.getWriter(); int interval = writer.getTermIndexInterval(); assertEquals(256, interval); + duh.close(); } @Test