You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/03/23 18:15:00 UTC

[GitHub] [accumulo] DomGarguilo opened a new issue #2586: Add check to ensure new tests are JUnit5 tests

DomGarguilo opened a new issue #2586:
URL: https://github.com/apache/accumulo/issues/2586


   **Is your feature request related to a problem? Please describe.**
   Since the recent migration to JUnit5 ([tracked here](https://github.com/apache/accumulo/issues/2441)), there have been several tests that have slipped through the cracks for one reason or another that use JUnit4 imports. For example #2572 and #2585 have been created to fix  JUnit4 tests whose modules have already been converted to JUnit5.
   
   **Describe the solution you'd like**
   It would be nice to add a checkstyle rule, or something similar, to warn of JUnit4 usage on certain modules that have already been fully converted to JUnit5. At this point not all modules are fully converted to JUnit5 so we would need to be able to ignore the check on certain modules.
   
   **Describe alternatives you've considered**
   Manually searching each module to see if any tests use JUnit4.
   
   I'm not too sure how this can be achieved but to find these tests, I search within a module for the imports that are not `junit.jupiter` which I do in my IDE with the regex "org.junit.[^j]". Something like the import checks done [here](https://github.com/apache/accumulo/blob/main/pom.xml#L1112-L1127) might work for this but I am not sure how to omit specific modules from being checked.
   


-- 
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: notifications-unsubscribe@accumulo.apache.org

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



[GitHub] [accumulo] ctubbsii commented on issue #2586: Add check to ensure new tests are JUnit5 tests

Posted by GitBox <gi...@apache.org>.
ctubbsii commented on issue #2586:
URL: https://github.com/apache/accumulo/issues/2586#issuecomment-1082084976


   > Something like the import checks done [here](https://github.com/apache/accumulo/blob/main/pom.xml#L1112-L1127) might work for this but I am not sure how to omit specific modules from being checked.
   
   It is possible to create a second execution of the plugin, with more narrow config, and that specific execution can be overridden or skipped in modules where JUnit4 is still used. Or, we could use a command-line grep in the GitHub Actions tasks. Or, we can just wait until all modules are JUnit5, to keep it simple.


-- 
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: notifications-unsubscribe@accumulo.apache.org

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