alopresto commented on a change in pull request #3825: NIFI-6782: Added repeat() String EL function URL: https://github.com/apache/nifi/pull/3825#discussion_r336612512
########## File path: nifi-commons/nifi-expression-language/src/test/java/org/apache/nifi/attribute/expression/language/TestQuery.java ########## @@ -2079,6 +2079,34 @@ public void testPadRight() { verifyEmpty("${nullString:padRight(10, \"@\")}", attributes); } + @Test + public void testRepeat() { + final Map<String, String> attributes = new HashMap<>(); + attributes.put("str", "abc"); + + verifyEquals("${not_exist:repeat(1, 2)}", attributes, ""); + verifyEquals("${str:repeat(1, 2)}", attributes, "abc"); Review comment: This line is not deterministic, as the potential results are `abc` and `abcabc`. I will fix when I merge. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services