Jungkihong07 opened a new pull request, #4004:
URL: https://github.com/apache/amoro/pull/4004

   ## Why are the changes needed?
   
   JUnit 4 is no longer actively maintained, and JUnit 5 provides a more modern 
and powerful testing framework. 
   This PR migrates all JUnit 4 tests in the `amoro-common` module to JUnit 5, 
enabling the use of the latest testing framework and reducing technical debt.
   
   Close #3974.
   
   ## Brief change log
   
   ### JUnit 4 → JUnit 5 Migration for amoro-common Module
   
   **Migrated Test Files (9 files):**
   
   1. `AmoroRunListener.java` - Converted `RunListener` → 
`TestExecutionListener`
   2. `TestServerTableDescriptor.java` - Converted `@Rule`, `@ClassRule` → 
`@BeforeAll`/`@AfterAll` and `@TempDir`
   3. `MemorySizeTest.java` - Converted `@Test(expected=...)` → `assertThrows()`
   4. `JacksonUtilTest.java`
   5. `TestSimpleFuture.java`
   6. `TestAmoroCatalogBase.java`
   7. `AmoroCatalogTestBase.java`
   8. `TestPoolConfig.java`
   9. `MockZookeeperServer.java`
   
   **Key Changes:**
   
   - Import changes: `org.junit.*` → `org.junit.jupiter.api.*`
   - Annotation changes: `@Before/After` → `@BeforeEach/AfterEach`, 
`@BeforeClass/AfterClass` → `@BeforeAll/AfterAll` (static)
   - Assertions changes: `Assert.*` → `Assertions.*`
   - Exception testing: `@Test(expected=...)` → `Assertions.assertThrows()`
   - Rules → Extensions: `@Rule` → `@RegisterExtension` or `@TempDir`
   - RunListener → TestExecutionListener: `AmoroRunListener` conversion
   
   ## How was this patch tested?
   
   - [x] All migrated test files executed and passed
   - [x] Full test suite for `amoro-common` module: `./mvnw test -pl 
amoro-common`
   - [x] Full build verification: `./mvnw clean package -DskipTests`
   
   ## Documentation
   
   - Does this pull request introduce a new feature? (no)
   
   - If yes, how is the feature documented? (not applicable)


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

Reply via email to