mirror of https://github.com/apache/lucene.git
SOLR-11263: add test for payload func with undefined field
Payload func with undefined used to throw NPE. In SOLR-11610, this was fixed to return proper error but there are no tests to verify changed the behavior. This add simple test to verify error code and error message
This commit is contained in:
parent
14b67012d0
commit
8322ea55f4
|
@ -470,6 +470,10 @@ public class TestFunctionQuery extends SolrTestCaseJ4 {
|
|||
);
|
||||
// this should pass
|
||||
assertQ(req("q", "*:*","defType","edismax", "boost","recip(1, 2, 3, 4)"));
|
||||
|
||||
// for undefined field NPE shouldn't be thrown
|
||||
assertQEx("Should Fail as the field is undefined", "undefined field a",
|
||||
req("q", "*:*", "fl", "x:payload(a,b)"), SolrException.ErrorCode.BAD_REQUEST);
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
Loading…
Reference in New Issue