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

David Handermann commented on NIFI-11767:
-----------------------------------------

Thanks for asking about this [~dstiegli1]. This an example of something where 
Groovy allowed working around method visibility, but this is not something that 
should be carried forward when refactoring.

Instead of calling sanitizeDn directly, it looks like formatDn should be used 
for public invocation. With formatDn simply adding delimiters around the 
sanitized result, it looks like the test method could be adjusted to expect the 
formatted results, which would avoid any need for reflection in the test class.

> Refactor Groovy tests in nifi-web-error and nifi-web-security to Java (and 
> JUnit 5)
> -----------------------------------------------------------------------------------
>
>                 Key: NIFI-11767
>                 URL: https://issues.apache.org/jira/browse/NIFI-11767
>             Project: Apache NiFi
>          Issue Type: Sub-task
>            Reporter: Daniel Stieglitz
>            Assignee: Daniel Stieglitz
>            Priority: Minor
>
> The following tests are to be refactored
> # 
> /nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-error/src/test/groovy/org/apache/nifi/web/filter/CatchAllFilterTest.groovy
> # 
> ./nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/groovy/org/apache/nifi/web/security/ProxiedEntitiesUtilsTest.groovy
> # 
> ./nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-security/src/test/groovy/org/apache/nifi/web/security/requests/ContentLengthFilterTest.groovy



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to