mirror of https://github.com/apache/lucene.git
SOLR-2755: verify that passed parameters work
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1327838 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
efd3e94237
commit
5a61a06a4a
|
@ -1138,4 +1138,17 @@ abstract public class SolrExampleTests extends SolrJettyTestBase
|
||||||
assertEquals("hello", out.get("name"));
|
assertEquals("hello", out.get("name"));
|
||||||
assertEquals("aaa", out.get("aaa"));
|
assertEquals("aaa", out.get("aaa"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void testQueryWithParams() throws SolrServerException {
|
||||||
|
SolrServer server = getSolrServer();
|
||||||
|
SolrQuery q = new SolrQuery("query");
|
||||||
|
q.setParam("debug", true);
|
||||||
|
QueryResponse resp = server.query(q);
|
||||||
|
assertEquals(
|
||||||
|
"server didn't respond with debug=true, didn't we pass in the parameter?",
|
||||||
|
"true",
|
||||||
|
((NamedList) resp.getResponseHeader().get("params")).get("debug"));
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue