Github user pvillard31 commented on a diff in the pull request:

    https://github.com/apache/nifi/pull/2597#discussion_r178135297
  
    --- Diff: 
nifi-nar-bundles/nifi-poi-bundle/nifi-poi-processors/src/test/java/org/apache/nifi/processors/poi/ConvertExcelToCSVProcessorTest.java
 ---
    @@ -187,6 +213,34 @@ public void testSkipColumns() throws Exception {
                     "9.8765E+08,\n");
         }
     
    +    @Test
    +    public void testSkipColumnsWithEL() throws Exception {
    +        testRunner.enqueue(new 
File("src/test/resources/dataformatting.xlsx").toPath());
    --- End diff --
    
    I'm fine with the tests you added. I just suggest that instead of directly 
setting the EL expression in the property value, you do a check against 
attributes that would come with the incoming flow file. Something like:
    
    ````java
    Map<String, String> attributes = new HashMap<String, String>();
    attributes.put("columnsToSkip", "2");
    testRunner.enqueue(new 
File("src/test/resources/dataformatting.xlsx").toPath(), variables);
    testRunner.setProperty(ConvertExcelToCSVProcessor.COLUMNS_TO_SKIP, 
"${columnsToSkip}");
    ````
    This way we check that EL is correctly evaluated against the attributes of 
the incoming flow files.


---

Reply via email to