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

Hemant Kumar commented on HDDS-9773:
------------------------------------

Junit5 doesn't support class level parameterize tests currently. They are 
working on this https://github.com/junit-team/junit5/issues/871 and 
https://github.com/junit-team/junit5/issues/878. Something may be available in 
couple of next releases.

I looked at ways to make class level parameterize test and came through this 
post: 
https://code-case.hashnode.dev/how-to-pass-parameterized-test-parameters-to-beforeeachaftereach-method-in-junit5.
 I thought about using this approach in HDDS-8201 but decided to go with simple 
approach and implemented two tests.

[~adoroszlai] what do you think if we implement 
https://code-case.hashnode.dev/how-to-pass-parameterized-test-parameters-to-beforeeachaftereach-method-in-junit5
 and use to migrate Junit4 tests to Junit5? It will help us migrating tests 
like https://issues.apache.org/jira/browse/HDDS-9779 to Junit5 which are 
heavily depends on class level parametrization.  

> TestOmSnapshotFileSystem is not run in CI
> -----------------------------------------
>
>                 Key: HDDS-9773
>                 URL: https://issues.apache.org/jira/browse/HDDS-9773
>             Project: Apache Ozone
>          Issue Type: Bug
>          Components: test
>    Affects Versions: 1.4.0
>            Reporter: Attila Doroszlai
>            Priority: Major
>
> HDDS-8201 migrated parameterized JUnit4 {{TestOmSnapshotFileSystem}} to 
> JUnit5 by creating two subclasses.  These are not executed, unless explicitly 
> specified by {{-Dtest}}.  (Search [latest [OM integration test 
> run|https://github.com/apache/ozone/actions/runs/6969482597/job/18966184833#step:6:94]
>  for {{TestOmSnapshotFileSystem}} to confirm.)
> [Initial 
> patch|https://github.com/apache/ozone/pull/5518/files/e870ab0e84a01e3800d4a8fed7a4ad4005578fe6]
>  in the [PR|https://github.com/apache/ozone/pull/5518] used a different 
> approach and was [executed in 
> CI|https://github.com/apache/ozone/actions/runs/6703326501/job/18214284130#step:6:190]
>  fine.
> CC [~hemantk]



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to