mirror of https://github.com/apache/lucene.git
SOLR-6365 bug fix matching wrong name when it is a shorter prefix of path
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1649996 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b10d20a122
commit
88eb9719fa
|
@ -74,7 +74,7 @@ public class InitParams {
|
|||
if("**".equals(ps)) return true;
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
return false;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -76,18 +76,7 @@ public class TestInitParams extends SolrTestCaseJ4 {
|
|||
|
||||
}
|
||||
|
||||
/*@Test
|
||||
public void testComponentWithInitParamAndRequestParam(){
|
||||
for (String s : Arrays.asList("/dump4")) {
|
||||
SolrRequestHandler handler = h.getCore().getRequestHandler(s);
|
||||
SolrQueryResponse rsp = new SolrQueryResponse();
|
||||
handler.handleRequest(req("param", "a","param","b" ,"param","c", "useParam","a"), rsp);
|
||||
NamedList def = (NamedList) rsp.getValues().get("params");
|
||||
assertEquals("A", def.get("a"));
|
||||
assertEquals("B", def.get("b"));
|
||||
assertEquals("C", def.get("c"));
|
||||
}
|
||||
}*/
|
||||
|
||||
@Test
|
||||
public void testComponentWithConflictingInitParams(){
|
||||
SolrRequestHandler handler = h.getCore().getRequestHandler("/dump2");
|
||||
|
@ -119,7 +108,10 @@ public class TestInitParams extends SolrTestCaseJ4 {
|
|||
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void testMatchPath(){
|
||||
InitParams initParams = new InitParams(new PluginInfo(InitParams.TYPE, ZkNodeProps.makeMap("path","/update/json/docs")));
|
||||
assertFalse(initParams.matchPath("/update"));
|
||||
assertTrue(initParams.matchPath("/update/json/docs"));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue