mirror of https://github.com/apache/lucene.git
tests: close requests
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1023606 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
342d75e92d
commit
1e90237359
|
@ -24,6 +24,7 @@ import org.apache.solr.core.SolrCore;
|
|||
import org.apache.solr.handler.component.QueryComponent;
|
||||
import org.apache.solr.handler.component.SearchComponent;
|
||||
import org.apache.solr.request.LocalSolrQueryRequest;
|
||||
import org.apache.solr.request.SolrQueryRequest;
|
||||
import org.apache.solr.response.SolrQueryResponse;
|
||||
import org.apache.solr.request.SolrRequestHandler;
|
||||
import org.junit.Test;
|
||||
|
@ -54,12 +55,13 @@ public class ClusteringComponentTest extends AbstractClusteringTestCase {
|
|||
SolrQueryResponse rsp;
|
||||
rsp = new SolrQueryResponse();
|
||||
rsp.add("responseHeader", new SimpleOrderedMap());
|
||||
handler.handleRequest(new LocalSolrQueryRequest(core, params), rsp);
|
||||
SolrQueryRequest req = new LocalSolrQueryRequest(core, params);
|
||||
handler.handleRequest(req, rsp);
|
||||
NamedList values = rsp.getValues();
|
||||
Object clusters = values.get("clusters");
|
||||
//System.out.println("Clusters: " + clusters);
|
||||
assertTrue("clusters is null and it shouldn't be", clusters != null);
|
||||
|
||||
req.close();
|
||||
|
||||
params = new ModifiableSolrParams();
|
||||
params.add(ClusteringComponent.COMPONENT_NAME, "true");
|
||||
|
@ -71,13 +73,13 @@ public class ClusteringComponentTest extends AbstractClusteringTestCase {
|
|||
|
||||
rsp = new SolrQueryResponse();
|
||||
rsp.add("responseHeader", new SimpleOrderedMap());
|
||||
handler.handleRequest(new LocalSolrQueryRequest(core, params), rsp);
|
||||
req = new LocalSolrQueryRequest(core, params);
|
||||
handler.handleRequest(req, rsp);
|
||||
values = rsp.getValues();
|
||||
clusters = values.get("clusters");
|
||||
//System.out.println("Clusters: " + clusters);
|
||||
assertTrue("clusters is null and it shouldn't be", clusters != null);
|
||||
|
||||
|
||||
req.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue