lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject svn commit: r1022789 - /lucene/dev/trunk/solr/src/test/org/apache/solr/search/TestRangeQuery.java
Date Fri, 15 Oct 2010 00:41:42 GMT
Author: yonik
Date: Fri Oct 15 00:41:42 2010
New Revision: 1022789

URL: http://svn.apache.org/viewvc?rev=1022789&view=rev
Log:
tests: fix resource leak

Modified:
    lucene/dev/trunk/solr/src/test/org/apache/solr/search/TestRangeQuery.java

Modified: lucene/dev/trunk/solr/src/test/org/apache/solr/search/TestRangeQuery.java
URL: http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/test/org/apache/solr/search/TestRangeQuery.java?rev=1022789&r1=1022788&r2=1022789&view=diff
==============================================================================
--- lucene/dev/trunk/solr/src/test/org/apache/solr/search/TestRangeQuery.java (original)
+++ lucene/dev/trunk/solr/src/test/org/apache/solr/search/TestRangeQuery.java Fri Oct 15 00:41:42
2010
@@ -18,6 +18,7 @@ package org.apache.solr.search;
 
 import org.apache.solr.SolrTestCaseJ4;
 import org.apache.solr.common.SolrInputDocument;
+import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.response.SolrQueryResponse;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -261,11 +262,13 @@ public class TestRangeQuery extends Solr
       SolrQueryResponse last=null;
       for (String q : qs) {
         // System.out.println("QUERY="+q);
+        SolrQueryRequest req = req("q",q,"rows","1000");
         SolrQueryResponse qr = h.queryAndResponse(handler, req("q",q,"rows","1000"));
         if (last != null) {
           // we only test if the same docs matched since some queries will include factors
like idf, etc.
           sameDocs((DocSet)qr.getValues().get("response"), (DocSet)last.getValues().get("response"));
         }
+        req.close();
         last = qr;
       }
     }



Mime
View raw message