SOLR-8029: test failures fixed

This commit is contained in:
Noble Paul 2017-01-31 22:40:44 +10:30
parent 71abe13069
commit eb42834617
1 changed files with 8 additions and 4 deletions

View File

@ -201,7 +201,8 @@ public class TestSolrConfigHandler extends RestTestBase {
10); 10);
payload = "{\n" + payload = "{\n" +
"'update-requesthandler' : { 'name' : '/x', 'class': 'org.apache.solr.handler.DumpRequestHandler' , 'startup' : 'lazy' , 'a':'b' , 'defaults': {'def_a':'def A val', 'multival':['a','b','c']}}\n" + "'update-requesthandler' : { 'name' : '/x', 'class': 'org.apache.solr.handler.DumpRequestHandler' ,registerPath :'/,/v2', " +
" 'startup' : 'lazy' , 'a':'b' , 'defaults': {'def_a':'def A val', 'multival':['a','b','c']}}\n" +
"}"; "}";
runConfigCommand(writeHarness, "/config?wt=json", payload); runConfigCommand(writeHarness, "/config?wt=json", payload);
@ -441,6 +442,7 @@ public class TestSolrConfigHandler extends RestTestBase {
payload = "{\n" + payload = "{\n" +
" 'add-requesthandler': {\n" + " 'add-requesthandler': {\n" +
" name : '/dump100',\n" + " name : '/dump100',\n" +
" registerPath :'/,/v2',"+
" class : 'org.apache.solr.handler.DumpRequestHandler'," + " class : 'org.apache.solr.handler.DumpRequestHandler'," +
" suggester: [{name: s1,lookupImpl: FuzzyLookupFactory, dictionaryImpl : DocumentDictionaryFactory}," + " suggester: [{name: s1,lookupImpl: FuzzyLookupFactory, dictionaryImpl : DocumentDictionaryFactory}," +
" {name: s2,lookupImpl: FuzzyLookupFactory , dictionaryImpl : DocumentExpressionDictionaryFactory}]" + " {name: s2,lookupImpl: FuzzyLookupFactory , dictionaryImpl : DocumentExpressionDictionaryFactory}]" +
@ -457,13 +459,15 @@ public class TestSolrConfigHandler extends RestTestBase {
map = getRespMap("/dump100?wt=json&json.nl=arrmap&initArgs=true", writeHarness); map = getRespMap("/dump100?wt=json&json.nl=arrmap&initArgs=true", writeHarness);
List initArgs = (List) map.get("initArgs"); List initArgs = (List) map.get("initArgs");
assertNotNull(initArgs);
assertTrue(initArgs.size() >= 2); assertTrue(initArgs.size() >= 2);
assertTrue(((Map)initArgs.get(0)).containsKey("suggester")); assertTrue(((Map)initArgs.get(2)).containsKey("suggester"));
assertTrue(((Map)initArgs.get(1)).containsKey("suggester")); assertTrue(((Map)initArgs.get(1)).containsKey("suggester"));
payload = "{\n" + payload = "{\n" +
"'add-requesthandler' : { 'name' : '/dump101', 'class': " + "'add-requesthandler' : { 'name' : '/dump101', 'class': " +
"'" + CacheTest.class.getName() + "' " + "'" + CacheTest.class.getName() + "', " +
" registerPath :'/,/v2'"+
", 'startup' : 'lazy'}\n" + ", 'startup' : 'lazy'}\n" +
"}"; "}";
runConfigCommand(writeHarness, "/config?wt=json", payload); runConfigCommand(writeHarness, "/config?wt=json", payload);