You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "mateczagany (via GitHub)" <gi...@apache.org> on 2026/02/25 07:48:54 UTC

[PR] [FLINK-39124][test] Migrate checkpointing ITCases to JUnit 5 [flink]

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

   ## What is the purpose of the change
   
   Migrate some of the tests in module flink-tests from JUnit4 to JUnit5.
   
   ## Brief change log
   
   - Migrate all test cases to use JUnit5.
   - Update all assertions to `assertThat()`
   - Limit scope for test classes where possible
   - Restrict visibility of fields where possible
   - Remove `@SuppressWarnings` where it was unnecessary
   
   ## Verifying this change
   
   - I ran each updated tests one by one after migrating them
   - CI should pass
   
   ## 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
   


-- 
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-unsubscribe@flink.apache.org

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


Re: [PR] [FLINK-39124][test] Migrate checkpointing ITCases to JUnit 5 [flink]

Posted by "mateczagany (via GitHub)" <gi...@apache.org>.
mateczagany commented on code in PR #27667:
URL: https://github.com/apache/flink/pull/27667#discussion_r2961046025


##########
flink-tests/src/test/java/org/apache/flink/test/streaming/runtime/TimestampITCase.java:
##########
@@ -70,14 +70,13 @@
 import java.util.List;
 import java.util.stream.Collectors;
 
-import static org.apache.flink.test.checkpointing.SavepointITCase.waitUntilAllTasksAreRunning;
+import static org.apache.flink.test.util.TestUtils.waitUntilAllTasksAreRunning;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 /** Tests for timestamps, watermarks, and event-time sources. */
-@SuppressWarnings("serial")
 public class TimestampITCase extends TestLogger {

Review Comment:
   Thank you for the review @RocMarshal 
   
   This file was only touched here because I've removed the method  `waitUntilAllTasksAreRunning` from `SavepointITCase`. The file will be migrated in PR #27668 instead: https://github.com/apache/flink/pull/27668/changes#diff-03b223e2ea5f43904c5879d0c4b2d65f4acacb2733cd27a09ebcf2309b5cc3ef
   
   I will revert the removal of `@SuppressWarnings("serial")`, as that's already present in the other PR



-- 
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-unsubscribe@flink.apache.org

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


Re: [PR] [FLINK-39124][test] Migrate checkpointing ITCases to JUnit 5 [flink]

Posted by "flinkbot (via GitHub)" <gi...@apache.org>.
flinkbot commented on PR #27667:
URL: https://github.com/apache/flink/pull/27667#issuecomment-3957478530

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "be30991b118f1b883d95718c3dcd3816ff005029",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "be30991b118f1b883d95718c3dcd3816ff005029",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * be30991b118f1b883d95718c3dcd3816ff005029 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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-unsubscribe@flink.apache.org

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


Re: [PR] [FLINK-39124][test] Migrate checkpointing ITCases to JUnit 5 [flink]

Posted by "RocMarshal (via GitHub)" <gi...@apache.org>.
RocMarshal commented on code in PR #27667:
URL: https://github.com/apache/flink/pull/27667#discussion_r2960447415


##########
flink-tests/src/test/java/org/apache/flink/test/streaming/runtime/TimestampITCase.java:
##########
@@ -70,14 +70,13 @@
 import java.util.List;
 import java.util.stream.Collectors;
 
-import static org.apache.flink.test.checkpointing.SavepointITCase.waitUntilAllTasksAreRunning;
+import static org.apache.flink.test.util.TestUtils.waitUntilAllTasksAreRunning;
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotEquals;
 import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 /** Tests for timestamps, watermarks, and event-time sources. */
-@SuppressWarnings("serial")
 public class TimestampITCase extends TestLogger {

Review Comment:
   It looks like there are still some dependency packages here that haven’t been fully migrated.
   - `public` key word
   - `TestLogger`



-- 
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-unsubscribe@flink.apache.org

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


Re: [PR] [FLINK-39124][test] Migrate checkpointing ITCases to JUnit 5 [flink]

Posted by "RocMarshal (via GitHub)" <gi...@apache.org>.
RocMarshal merged PR #27667:
URL: https://github.com/apache/flink/pull/27667


-- 
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-unsubscribe@flink.apache.org

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