Skip to content

Apache Lucene open-source search software

tests: fix resource leak

Yonik Seeley73a0a1da8362
diff --git a/solr/src/test/org/apache/solr/BasicFunctionalityTest.java b/solr/src/test/org/apache/solr/BasicFunctionalityTest.java
index 8fc4bf8cd94..ceab163be77 100644
--- a/solr/src/test/org/apache/solr/BasicFunctionalityTest.java
+++ b/solr/src/test/org/apache/solr/BasicFunctionalityTest.java
@@ -237,12 +237,12 @@ public class BasicFunctionalityTest extends SolrTestCaseJ4 {
};
handler.init(new NamedList());
SolrQueryResponse rsp = new SolrQueryResponse();
+ SolrQueryRequest req = req();
h.getCore().execute(handler,
- new LocalSolrQueryRequest(h.getCore(),
- new NamedList()),
+ req,
rsp);
assertNotNull("should have found an exception", rsp.getException());
-
+ req.close();
}
@Test