spuru9 opened a new pull request, #28261:
URL: https://github.com/apache/flink/pull/28261

   ## What is the purpose of the change
   
   Migrate all JUnit 4 tests in `flink-state-backends/flink-statebackend-forst` 
to JUnit 5 (Jupiter) as part of the ongoing migration tracked under 
[FLINK-25325](https://issues.apache.org/jira/browse/FLINK-25325). This 
eliminates the last JUnit 4 imports from the ForSt module.
   
   JIRA: [FLINK-39767](https://issues.apache.org/jira/browse/FLINK-39767)
   
   ## Brief change log
   
   9 test files migrated:
   
   - `ForStIncrementalCheckpointRescalingTest` — parameterized: 
`@RunWith(Parameterized.class)` → 
`@ExtendWith(ParameterizedTestExtension.class)` with `@TestTemplate`
   - `ForStInitITCase`
   - `ForStMemoryControllerUtilsTest`
   - `ForStMultiClassLoaderTest`
   - `ForStNativeMetricOptionsTest`
   - `ForStOperationsUtilsTest`
   - `ForStResourceContainerTest`
   - `ForStStateBackendConfigTest`
   - `ForStStateBackendFactoryTest`
   
   Per-file changes:
   
   - `org.junit.*` imports → `org.junit.jupiter.api.*`
   - `@Before` / `@After` / `@BeforeClass` / `@AfterClass` → `@BeforeEach` / 
`@AfterEach` / `@BeforeAll` / `@AfterAll`
   - `@Rule TemporaryFolder` / `@ClassRule TemporaryFolder` → `@TempDir 
java.nio.file.Path` + `TempDirUtils.newFolder(...)` / 
`TempDirUtils.newFile(...)`
   - `@Test(expected = X.class)` → 
`assertThatThrownBy(...).isInstanceOf(X.class)`
   - Hamcrest + `org.junit.Assert.*` → AssertJ (project convention)
   - Drop `extends TestLogger` and `public` modifiers per the Flink JUnit 5 
Migration Guide
   
   No production code is touched.
   
   ## Verifying this change
   
   This change is a test refactor and is covered by the migrated tests 
themselves:
   
   ```
   ./mvnw -pl flink-state-backends/flink-statebackend-forst test
   ```
   
   Result: **976 tests run, 0 failures, 0 errors, 5 skipped**. Total test count 
and pass/skip distribution match the pre-migration baseline.
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (no)
     - The serializers: (no)
     - The runtime per-record code paths (performance sensitive): (no)
     - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Kubernetes/Yarn, ZooKeeper: (no)
     - The S3 file system connector: (no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (no)
     - If yes, how is the feature documented? (not applicable)
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [x] Yes — Claude Code


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