nifi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bryan Bende <bbe...@gmail.com>
Subject Re: Did something change with PropertyDescriptor validation?
Date Fri, 25 Aug 2017 17:46:05 GMT
Mike,

I believe this is how it always worked and is just a mis-leading
message from the mock framework.

You have to have at least one validator and you can use
Validator.VALID if you just want it to always be valid.

-Bryan


On Fri, Aug 25, 2017 at 1:33 PM, Mike Thomsen <mikerthomsen@gmail.com> wrote:
> I have this descriptor:
>
>     public static final PropertyDescriptor TYPE = new
> PropertyDescriptor.Builder()
>             .name("el5-type")
>             .displayName("Type")
>             .description("The type of this document (used by Elasticsearch
> for indexing and searching)")
>             .defaultValue("")
>             .required(false)
>             .expressionLanguageSupported(true)
>             .build();
>
> When I run my JUnit tests I get the following error:
>
>   TestJsonQueryElasticsearch5.testAggregations:134 Processor has 1
> validation failures:
> 'el5-type' validated against 'msg' is invalid because 'el5-type' is not a
> supported property
>
> But TYPE is added to the list of property descriptors and when I use
> addValidator(StandardValidators.NON_BLANK_VALIDATOR) it runs just fine.
>
> Any ideas?
>
> Thanks,
>
> Mike

Mime
View raw message