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

   ## What changes were proposed in this pull request?
   
   Some modules had been completely migrated to JUnit5.  Ideally we should 
remove JUnit4 dependency, but it is also coming transitively from test utils.  
Until the dependency can be completely removed, we should ban import of JUnit4 
classes in such modules to avoid JUnit4 tests creeping back.
   
   The goal of this change is to introduce the ban in modules that are 
currently completely on JUnit5.  Test migration tasks should then also add the 
rule to modules being cleaned up.
   
   https://issues.apache.org/jira/browse/HDDS-9492
   
   ## How was this patch tested?
   
   Added import of JUnit4 classes in some tests, tried to build locally:
   
   ```
   $ mvn clean package
   ...
   
   [ERROR] Banned imports detected in TEST code:
   [ERROR] 
   [ERROR] Reason: Use JUnit5
   [ERROR]      in file: org/apache/ozone/erasurecode/TestCoderBase.java
   [ERROR]              static org.junit.Assert.assertTrue      (Line: 27, 
Matched by: static org.junit.*.*)
   
   ...
   
   [ERROR]      in file: org/apache/hadoop/ozone/TestOmUtils.java
   [ERROR]              org.junit.Test  (Line: 23, Matched by: org.junit.*)
   ```
   
   Regular CI:
   
https://github.com/adoroszlai/hadoop-ozone/actions/runs/6675278717/job/18143101681


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to