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

   ## What is the purpose of the change
   
   Migrate the remaining JUnit 4 tests in 
`flink-libraries/flink-state-processing-api` to JUnit 5 (Jupiter). After this 
PR the module has zero JUnit 4 imports. Part of the umbrella JUnit 4 → 5 
migration.
   
   JIRA: [FLINK-39770](https://issues.apache.org/jira/browse/FLINK-39770) 
(sub-task of [FLINK-25325](https://issues.apache.org/jira/browse/FLINK-25325))
   
   ## Brief change log
   
   20 test classes migrated across the module (`org.apache.flink.state.api` and 
its `input` / `output` / `runtime` / `utils` sub-packages):
   
   - `org.junit.*` imports → `org.junit.jupiter.api.*`; lifecycle annotations 
`@Before*`/`@After*` → `@BeforeEach`/`@AfterEach`/`@BeforeAll`/`@AfterAll`.
   - `extends AbstractTestBaseJUnit4` → `extends AbstractTestBase` (the JUnit 5 
sibling) for the six ITCase / base classes.
   - Two parameterized tests (`SavepointDeepCopyTest`, 
`SavepointWriterWindowITCase`): `@RunWith(Parameterized.class)` → 
`@ExtendWith(ParameterizedTestExtension.class)` with `@Parameter` field 
injection and `@TestTemplate`.
   - `@Rule TemporaryFolder` → `@TempDir` for single-dir cases; `TempDirUtils` 
retained where a test needs several distinct dirs.
   - `@Test(expected = X.class)` → 
`assertThatThrownBy(...).isInstanceOf(X.class)` (with message assertions where 
the original test checked them).
   - Hamcrest + `org.junit.Assert.*` → AssertJ; drop `public` modifiers on test 
classes/methods per the [Flink JUnit 5 Migration 
Guide](https://docs.google.com/document/d/1514Wa_aNB9bJUen4xm5uiuXOooOJTtXqS_Jqk9KJitU/edit).
   
   No production code is touched.
   
   ## Verifying this change
   
   This change is a test-only migration covered by the existing tests it 
migrates:
   
   ```
   ./mvnw -pl flink-libraries/flink-state-processing-api verify
   ```
   
   Result: **115 tests run (53 unit + 62 integration), 0 failures, 0 errors, 0 
skipped**, matching 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