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

Daniel Stieglitz edited comment on NIFI-11130 at 2/6/23 4:46 PM:
-----------------------------------------------------------------

[~exceptionfactory] I have made changes to replace the instances of where 
Groovy assert was used but there were also a few instances where Java unit 
tests were using Java assert so I replaced those also. Many of the Groovy 
assert instances were used in Spock unit tests which I am not familiar with and 
I was not sure how to refactor to Java. Those files are:
# 
nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/groovy/org/apache/nifi/util/SnippetUtilsSpec.groovy
# 
nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/groovy/org/apache/nifi/controller/PositionScalerSpec.groovy
# 
nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/groovy/org/apache/nifi/web/StandardNiFiServiceFacadeSpec.groovy
# 
nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/groovy/org/apache/nifi/web/dao/impl/StandardPolicyBasedAuthorizerDAOSpec.groovy
# 
nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/groovy/org/apache/nifi/web/dao/impl/StandardTemplateDAOSpec.groovy

Can those be left for NIFI-10047 ? 

Also the scripts under directory 
{code:java}
nifi/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/src/test/resources/groovy
{code} which are executed in unit tests also use Groovy assert but I assumed 
those do not need to have JUnit asserts.



was (Author: JIRAUSER294662):
[~exceptionfactory] I have made changes to replace the instances of where 
Groovy assert was used but there were also a few instances where Java unit 
tests were using Java assert so I replaced those also. Many of the Groovy 
assert instances were used in Spock unit tests which I am not familiar with and 
I was not sure how to refactor to Java. Those files are:
# 
nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-components/src/test/groovy/org/apache/nifi/util/SnippetUtilsSpec.groovy
# 
nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-framework-core/src/test/groovy/org/apache/nifi/controller/PositionScalerSpec.groovy
# 
nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/groovy/org/apache/nifi/web/StandardNiFiServiceFacadeSpec.groovy
# 
nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/groovy/org/apache/nifi/web/dao/impl/StandardPolicyBasedAuthorizerDAOSpec.groovy
# 
nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-api/src/test/groovy/org/apache/nifi/web/dao/impl/StandardTemplateDAOSpec.groovy

Can those be left for NIFI-10047 ? 

Also the scripts under directory 
{code:java}
nifi/nifi-nar-bundles/nifi-groovyx-bundle/nifi-groovyx-processors/src/test/resources/groovy
{code} which are executed in unit tests also have asserts but I assumed those 
do not need to have Junit asserts.


> Refactor Groovy assert statements under nifi/nifi-nar-bundles to use JUnit 5 
> Assertions
> ---------------------------------------------------------------------------------------
>
>                 Key: NIFI-11130
>                 URL: https://issues.apache.org/jira/browse/NIFI-11130
>             Project: Apache NiFi
>          Issue Type: Sub-task
>            Reporter: Daniel Stieglitz
>            Assignee: Daniel Stieglitz
>            Priority: Minor
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> A regular expression search 
> {code:java}
> assert .*
> {code}
> in nifi/nifi-nar-bundles indicates there are over 100 Groovy assert 
> statements. 
> Refactor these to use JUnit 5 assertions.



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

Reply via email to