[ 
https://issues.apache.org/jira/browse/NIFI-1123?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15007661#comment-15007661
 ] 

ASF GitHub Bot commented on NIFI-1123:
--------------------------------------

Github user trkurc commented on the pull request:

    https://github.com/apache/nifi/pull/116#issuecomment-157213254
  
    @jskora what would you expect the following unit tests to do?
    
    ```
        @Test
        public void testInvalidRegex() {
            final TestRunner runner = TestRunners.newTestRunner(new 
UpdateAttribute());
            runner.setProperty("Delete Attributes Expression", "(");
    
            final Map<String, String> attributes = new HashMap<>();
            attributes.put("attribute.1", "value.1");
    
            runner.enqueue(new byte[0], attributes);
    
            runner.run();
    
        }
        
        @Test
        public void testInvalidRegexInAttribute() {
            final TestRunner runner = TestRunners.newTestRunner(new 
UpdateAttribute());
            runner.setProperty("Delete Attributes Expression", "${butter}");
    
            final Map<String, String> attributes = new HashMap<>();
            attributes.put("butter", "(");
    
            runner.enqueue(new byte[0], attributes);
    
            runner.run();
    
        }
    
    ```



> Extend the "Delete Attributes Expression" to support Expression Language
> ------------------------------------------------------------------------
>
>                 Key: NIFI-1123
>                 URL: https://issues.apache.org/jira/browse/NIFI-1123
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Core Framework
>            Reporter: Joe Skora
>            Assignee: Joe Skora
>            Priority: Minor
>              Labels: easyfix, features, patch
>
> Allow the "Delete Attributes Expression" to accept Expression Language to 
> dynamically produce the regular expression to identify attributes to be 
> deleted per discussion on 
> [NIFI-641|https://issues.apache.org/jira/browse/NIFI-641].



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to