[
https://issues.apache.org/jira/browse/NIFI-1977?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15386679#comment-15386679
]
Gregory Hart commented on NIFI-1977:
------------------------------------
I can confirm I'm seeing the same issue in 0.5.0. Calling
`.addValidator(Validator.VALID)` when building the property resolves the issue.
Are all properties required to have a validator? If so, I suggest explaining
this in the error message.
> Property descriptors without explicit validators are not recognized
> -------------------------------------------------------------------
>
> Key: NIFI-1977
> URL: https://issues.apache.org/jira/browse/NIFI-1977
> Project: Apache NiFi
> Issue Type: Bug
> Components: Core Framework
> Affects Versions: 0.6.1
> Reporter: Andrew Grande
>
> Looks like a bug in a testing framework.
> I have a simple test case like this one:
> {code:java}
> @Test
> public void customHeader() {
> final TestRunner runner =
> TestRunners.newTestRunner(ParseCSVRecord.class);
> runner.setProperty(PROP_CUSTOM_HEADER, "Column 1,Column 2");
> runner.enqueue("row1col1,row1col2\nrow2col1, row2col2");
> runner.run();
> {code}
> When a property is declared without an explicit validator, the test runner
> fails complaining that Custom Header is not a supported property (yes, I've
> added it to the descriptors list).
> {code:java}
> public static final PropertyDescriptor PROP_CUSTOM_HEADER = new
> PropertyDescriptor.Builder()
> .name("Custom Header")
> .description("Use this header (delimited according to set rules) instead of
> auto-discovering it from schema")
> .required(false)
> .expressionLanguageSupported(true)
> .build();
> {code}
> The intent here is to not have a validator declared, but rather implement
> more complex logic in the customValidate() callback, but the test never gets
> to that point.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)