You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by "adoroszlai (via GitHub)" <gi...@apache.org> on 2024/01/07 18:16:00 UTC

[PR] HDDS-10081. Copy and migrate Hadoop base test classes to JUnit5 [ozone]

adoroszlai opened a new pull request, #5939:
URL: https://github.com/apache/ozone/pull/5939

   ## What changes were proposed in this pull request?
   
   Ozone relies on base test classes from Hadoop for:
   
    * `TestOzoneConfigurationFields`
    * filesystem contract tests
   
   Currently those base classes are implemented using JUnit4 (migration is in progress in Hadoop repo).
   
   This PR:
   
    * copies the base classes from Hadoop 3.3.6
    * migrates them to JUnit5 as much as possible (incorporating in-progress changes from Hadoop) without touching the concrete implementation subclasses in Ozone
   
   `TestConfigurationFieldsBase` is completely migrated.
   
   Abstract contract tests:
   
    * assertions migrated to AssertJ (HADOOP-19025)
    * `extends Assert` removed from `AbstractFSContractTestBase` and `ContractTestUtils`
    * JUnit5 lifecycle annotations added (but JUnit4-ones also kept)
    * `@Test` annotations left unchanged (still using JUnit4)
    * slightly tweaked for checkstyle/findbugs (but still need some suppression), since rules in Hadoop seem more lenient
   
   Most Ozone contract tests use `Parameterized` runner, which requires quite some refactoring for migrating to JUnit5.  HDDS-10074 will finish that by refactoring Ozone's contract tests to JUnit5, and simply replacing `@Test` annotations in the abstract contract test base classes.
   
   https://issues.apache.org/jira/browse/HDDS-10081
   
   ## How was this patch tested?
   
   Existing _integration (contract)_ check in [CI](https://github.com/adoroszlai/ozone/actions/runs/7439172167/job/20238914151#step:6:142):
   
   ```
   Tests run: 357, Failures: 0, Errors: 0, Skipped: 6
   ```


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-10081. Copy and migrate Hadoop base test classes to JUnit5 [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #5939:
URL: https://github.com/apache/ozone/pull/5939#issuecomment-1884910197

   This might seem to be a large change, but most of the code is copied from Hadoop.  Since this code is intended to be temporary in Ozone, I don't think we need to inspect it in detail, or adapt to Ozone coding conventions (beyond what checkstyle/findbugs complains about).
   
   Having the same number of tests before/after the change, and with all tests passing, I think it should be fine.
   
   If it helps during review, the follow-up change (conversion of Ozone contract tests to JUnit5) can be peeked at: https://github.com/adoroszlai/ozone/commit/708f49bdb8fb52c770e581bb9d74c9fb28a1f38c.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-10081. Copy and migrate Hadoop base test classes to JUnit5 [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #5939:
URL: https://github.com/apache/ozone/pull/5939#issuecomment-1885756303

   Thanks @hemantk-12 for the review.  I pushed a new commit that replaces an import, because it is no longer accepted in Ozone after HDDS-10099:
   
   ```diff
   -import org.apache.hadoop.thirdparty.com.google.common.base.Charsets;
   +import com.google.common.base.Charsets;
   ```


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-10081. Copy and migrate Hadoop base test classes to JUnit5 [ozone]

Posted by "SaketaChalamchala (via GitHub)" <gi...@apache.org>.
SaketaChalamchala commented on PR #5939:
URL: https://github.com/apache/ozone/pull/5939#issuecomment-1881494801

   @swamirishi could you please take a look as well?


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-10081. Copy and migrate Hadoop base test classes to JUnit5 [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai merged PR #5939:
URL: https://github.com/apache/ozone/pull/5939


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-10081. Copy and migrate Hadoop base test classes to JUnit5 [ozone]

Posted by "SaketaChalamchala (via GitHub)" <gi...@apache.org>.
SaketaChalamchala commented on PR #5939:
URL: https://github.com/apache/ozone/pull/5939#issuecomment-1881493887

   @hemantk-12 can you please take a look?


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org


Re: [PR] HDDS-10081. Copy and migrate Hadoop base test classes to JUnit5 [ozone]

Posted by "adoroszlai (via GitHub)" <gi...@apache.org>.
adoroszlai commented on PR #5939:
URL: https://github.com/apache/ozone/pull/5939#issuecomment-1886653687

   Thanks @hemantk-12, @smengcl for the review.


-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@ozone.apache.org
For additional commands, e-mail: issues-help@ozone.apache.org