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:
Sami Siren 2012-04-19 06:16:46 +00:00
parent efd3e94237
commit 5a61a06a4a
1 changed files with 13 additions and 0 deletions

View File

@ -1138,4 +1138,17 @@ abstract public class SolrExampleTests extends SolrJettyTestBase
assertEquals("hello", out.get("name"));
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"));
}
}