mirror of https://github.com/apache/lucene.git
tests: remove test that doesn't do much, and has a resource leak
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1022708 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5086f404a9
commit
a9e8bddb9a
|
@ -1,47 +0,0 @@
|
||||||
package org.apache.solr.search;
|
|
||||||
|
|
||||||
import org.apache.lucene.search.Query;
|
|
||||||
import org.apache.solr.common.params.ModifiableSolrParams;
|
|
||||||
import org.apache.solr.request.LocalSolrQueryRequest;
|
|
||||||
import org.apache.solr.request.SolrQueryRequest;
|
|
||||||
import org.apache.solr.search.function.ConstValueSource;
|
|
||||||
import org.apache.solr.search.function.FunctionQuery;
|
|
||||||
import org.apache.solr.search.function.LiteralValueSource;
|
|
||||||
import org.apache.solr.util.AbstractSolrTestCase;
|
|
||||||
|
|
||||||
import java.util.HashMap;
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*
|
|
||||||
**/
|
|
||||||
public class FunctionQParserTest extends AbstractSolrTestCase {
|
|
||||||
public String getSchemaFile() {
|
|
||||||
return "schema11.xml";
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSolrConfigFile() {
|
|
||||||
return "solrconfig-functionquery.xml";
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getCoreName() {
|
|
||||||
return "basic";
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public void testFunctionQParser() throws Exception {
|
|
||||||
ModifiableSolrParams local = new ModifiableSolrParams();
|
|
||||||
ModifiableSolrParams params = new ModifiableSolrParams();
|
|
||||||
SolrQueryRequest req = new LocalSolrQueryRequest(h.getCore(), "_val_:'foo'", "", 0, 10, new HashMap());
|
|
||||||
FunctionQParser parser;
|
|
||||||
Query query;
|
|
||||||
FunctionQuery fq;
|
|
||||||
parser = new FunctionQParser("'foo'", local, params, req);
|
|
||||||
query = parser.parse();
|
|
||||||
assertTrue("query is not a FunctionQuery", query instanceof FunctionQuery);
|
|
||||||
fq = (FunctionQuery) query;
|
|
||||||
assertTrue("ValueSource is not a LiteralValueSource", fq.getValueSource() instanceof LiteralValueSource);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
Loading…
Reference in New Issue