nastra commented on issue #7160:
URL: https://github.com/apache/iceberg/issues/7160#issuecomment-1479289308

   It's worth looking at 
https://junit.org/junit5/docs/current/user-guide/#migrating-from-junit4. There 
are a few items to watch out for:
   
   For example in JUnit4 the method signature of `assertEquals()` was 
`assertEquals(String message, Object expected, Object actual)` but in JUnit5 it 
is `assertEquals(Object expected, Object actual, String message)`. There are 
also a few more methods affected by this. See 
https://junit.org/junit5/docs/current/user-guide/#migrating-from-junit4-failure-message-arguments
 for some details.
   In those cases I'm not sure what's better (just converting from JUnit4 to 
JUnit5 assertions or switching assertion checks to AssertJ where it makes 
sense). Both will cause larger diffs.
   
   For modules that don't use JUnit5 yet, those would require
   ```
   test {
       useJUnitPlatform()
     }
   ```
   
   Things like `@Rule public TemporaryFolder temp = new TemporaryFolder();` 
don't work in JUni5 and would have to be converted to `@TempDir Path temp;`.
   
   It's worth doing the conversion module-by-module and starting in a module 
that has a small amount of tests (like `iceberg-pig` or `iceberg-gcp`).
   
   @jackye1995 any thoughts on the outlined approach?


-- 
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-unsubscr...@iceberg.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to