SOLR-7226: fixed the commented out testcase due to failure

git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1669634 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Noble Paul 2015-03-27 17:50:14 +00:00
parent 83969f44a0
commit e0ff3a6b0c
1 changed files with 7 additions and 16 deletions

View File

@ -358,31 +358,22 @@ public class TestSolrConfigHandler extends RestTestBase {
10);
payload = "{\n" +
"'delete-transformer' : 'mytrans'" +
"}";
runConfigCommand(writeHarness, "/config?wt=json", payload);
testForResponseElement(writeHarness,
testServerBaseUrl,
"/config?wt=json",
cloudSolrServer,
Arrays.asList("config", "transformer", "mytrans"),
null,
10);
payload = "{\n" +
"'delete-transformer' : 'mytrans'," +
"'create-initparams' : { 'name' : 'hello', 'key':'val'}\n" +
"}";
runConfigCommand(writeHarness, "/config?wt=json", payload);
Map map = testForResponseElement(writeHarness,
Map map = testForResponseElement(writeHarness,
testServerBaseUrl,
"/config?wt=json",
cloudSolrServer,
Arrays.asList("config", "transformer", "mytrans"),
null,
10);
// List l = (List) ConfigOverlay.getObjectByPath(map,false, Arrays.asList("config", "initParams"));
// assertNotNull("no object /config/initParams : "+ TestBlobHandler.getAsString(map) , l);
// assertEquals( 1, l.size());
// assertEquals( "val", ((Map)l.get(0)).get("key") );
List l = (List) ConfigOverlay.getObjectByPath(map,false, Arrays.asList("config", "initParams"));
assertNotNull("no object /config/initParams : "+ TestBlobHandler.getAsString(map) , l);
assertEquals( 1, l.size());
assertEquals( "val", ((Map)l.get(0)).get("key") );
}
public static Map testForResponseElement(RestTestHarness harness,