mirror of https://github.com/apache/lucene.git
Set the searcherHolder to null on close. See:
http://www.nabble.com/AlreadyClosedException-in-JUnit-tests--tf4893565.html git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@599458 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
46b26e7b21
commit
5122ececbb
|
@ -193,6 +193,7 @@ public abstract class SolrQueryRequestBase implements SolrQueryRequest {
|
|||
public void close() {
|
||||
if (searcherHolder!=null) {
|
||||
searcherHolder.decref();
|
||||
searcherHolder = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -76,6 +76,9 @@ public class StandardRequestHandlerTest extends AbstractSolrTestCase {
|
|||
// Make sure score parsing works
|
||||
args.put( CommonParams.SORT, "score desc" );
|
||||
assertQ("with sort param [desc]", req,"//*[@numFound='3']" );
|
||||
|
||||
args.put( CommonParams.SORT, "score asc" );
|
||||
assertQ("with sort param [desc]", req,"//*[@numFound='3']" );
|
||||
|
||||
// Using legacy ';' param
|
||||
args.remove( CommonParams.SORT );
|
||||
|
|
Loading…
Reference in New Issue