mirror of https://github.com/apache/lucene.git
SOLR-2020: use echoParams, remove SOP
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1331286 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e84ba16dd7
commit
efcd62f311
|
@ -608,22 +608,15 @@ abstract public class SolrExampleTests extends SolrJettyTestBase
|
|||
ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update");
|
||||
up.addFile(getFile("solrj/docs1.xml")); // 2
|
||||
up.addFile(getFile("solrj/docs2.xml")); // 3
|
||||
up.setParam("a", "\u1234");
|
||||
up.setParam(CommonParams.HEADER_ECHO_PARAMS, CommonParams.EchoParamStyle.ALL.toString());
|
||||
up.setAction(AbstractUpdateRequest.ACTION.COMMIT, true, true);
|
||||
NamedList<Object> result = server.request(up);
|
||||
Assert.assertEquals("\u1234",
|
||||
((NamedList)((NamedList) result.get("responseHeader")).get("params")).get("a"));
|
||||
assertNotNull("Couldn't upload xml files", result);
|
||||
rsp = server.query( new SolrQuery( "*:*") );
|
||||
Assert.assertEquals( 5 , rsp.getResults().getNumFound() );
|
||||
|
||||
//params encoding, multipart
|
||||
up = new ContentStreamUpdateRequest("/debug/dump");
|
||||
up.addFile(getFile("solrj/docs1.xml")); // 2
|
||||
up.addFile(getFile("solrj/docs2.xml")); // 3
|
||||
up.setParam("a", "\u1234");
|
||||
result = server.request(up);
|
||||
System.out.println(result);
|
||||
Assert.assertEquals("\u1234",
|
||||
((NamedList)((NamedList) result.get("responseHeader")).get("params")).get("a"));
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue