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:
Sami Siren 2012-04-27 08:09:58 +00:00
parent e84ba16dd7
commit efcd62f311
1 changed files with 4 additions and 11 deletions

View File

@ -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"));
}