You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/04/24 13:41:51 UTC

[GitHub] [flink] GOODBOY008 opened a new pull request, #19563: [WIP][FLINK-25537] [JUnit5 Migration] Module: flink-core

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

   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   
   <!--
   *Thank you very much for contributing to Apache Flink - we are happy that you want to help us improve Flink. To help the community review your contribution in the best possible way, please go through the checklist below, which will get the contribution into a shape in which it can be best reviewed.*
   
   *Please understand that we do not do this to make contributions to Flink a hassle. In order to uphold a high standard of quality for code contributions, while at the same time managing a large number of contributions, we need contributors to prepare the contributions well, and give reviewers enough contextual information for the review. Please also understand that contributions that do not follow this guide will take longer to review and thus typically be picked up with lower priority by the community.*
   
   ## Contribution Checklist
   
     - Make sure that the pull request corresponds to a [JIRA issue](https://issues.apache.org/jira/projects/FLINK/issues). Exceptions are made for typos in JavaDoc or documentation files, which need no JIRA issue.
     
     - Name the pull request in the form "[FLINK-XXXX] [component] Title of the pull request", where *FLINK-XXXX* should be replaced by the actual issue number. Skip *component* if you are unsure about which is the best component.
     Typo fixes that have no associated JIRA issue should be named following this pattern: `[hotfix] [docs] Fix typo in event time introduction` or `[hotfix] [javadocs] Expand JavaDoc for PuncuatedWatermarkGenerator`.
   
     - Fill out the template below to describe the changes contributed by the pull request. That will give reviewers the context they need to do the review.
     
     - Make sure that the change passes the automated tests, i.e., `mvn clean verify` passes. You can set up Azure Pipelines CI to do that following [this guide](https://cwiki.apache.org/confluence/display/FLINK/Azure+Pipelines#AzurePipelines-Tutorial:SettingupAzurePipelinesforaforkoftheFlinkrepository).
   
     - Each pull request should address only one issue, not mix up code from multiple issues.
     
     - Each commit in the pull request has a meaningful commit message (including the JIRA id)
   
     - Once all items of the checklist are addressed, remove the above text and this checklist, leaving only the filled out template below.
   
   
   **(The sections below can be removed for hotfixes of typos)**
   -->
   
   ## What is the purpose of the change
   
   *Update the flink-core module to AssertJ and JUnit 5 following the [JUnit 5 Migration Guide](https://docs.google.com/document/d/1514Wa_aNB9bJUen4xm5uiuXOooOJTtXqS_Jqk9KJitU/edit)
   Also it touches tests extending from org.apache.flink.table.catalog.CatalogTest*
   
   
   ## Brief change log
   
   *Use JUnit5 and AssertJ in tests instead of JUnit4 and Hamcrest*
   
   
   ## Verifying this change
   
   This change is a code cleanup without any test coverage.
   
   ## 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


[GitHub] [flink] flinkbot commented on pull request #19563: [WIP][FLINK-25537] [JUnit5 Migration] Module: flink-core

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #19563:
URL: https://github.com/apache/flink/pull/19563#issuecomment-1107845384

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "07ed74e743fb1e266ec096a65c11263cd7a7048c",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "07ed74e743fb1e266ec096a65c11263cd7a7048c",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 07ed74e743fb1e266ec096a65c11263cd7a7048c 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] [WIP][FLINK-25537] [JUnit5 Migration] Module: flink-core [flink]

Posted by "GOODBOY008 (via GitHub)" <gi...@apache.org>.
GOODBOY008 closed pull request #19563: [WIP][FLINK-25537]  [JUnit5 Migration] Module: flink-core
URL: https://github.com/apache/flink/pull/19563


-- 
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] [WIP][FLINK-25537] [JUnit5 Migration] Module: flink-core [flink]

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

   @flinkbot run azure


-- 
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] [WIP][FLINK-25537] [JUnit5 Migration] Module: flink-core [flink]

Posted by "Jiabao-Sun (via GitHub)" <gi...@apache.org>.
Jiabao-Sun commented on code in PR #19563:
URL: https://github.com/apache/flink/pull/19563#discussion_r1381328430


##########
flink-core/src/test/java/org/apache/flink/api/common/accumulators/AverageAccumulatorTest.java:
##########
@@ -94,21 +92,21 @@ public void testMergeSuccess() {
         }
 
         avg1.merge(avg2);
-        assertEquals(4.5, avg1.getLocalValue(), 0.0);
+        assertThat(avg1.getLocalValue()).isEqualTo(4.5);
     }
 
     @Test
-    public void testMergeFailed() {
+    void testMergeFailed() {
         AverageAccumulator average = new AverageAccumulator();
         Accumulator<Double, Double> averageNew = null;
         average.add(1);
         try {
             average.merge(averageNew);
             fail("should fail with an exception");
         } catch (IllegalArgumentException e) {
-            assertNotNull(e.getMessage());
-            assertTrue(
-                    e.getMessage().contains("The merged accumulator must be AverageAccumulator."));
+            assertThat(e.getMessage()).isNotNull();
+            assertThat(e.getMessage())
+                    .contains("The merged accumulator must be AverageAccumulator.");

Review Comment:
   We can use `assertThatThrows` to simplify.



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -58,29 +53,29 @@ public void singleImmediateIdleness() {
 
         watermarkOutput.markIdle();
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), nullValue());
-        assertThat(underlyingWatermarkOutput.isIdle(), is(true));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isNull();
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(true);

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.isIdle()).isTrue();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -256,15 +251,15 @@ public void immediateUpdatesTakeDeferredUpdatesIntoAccount() {
 
         deferredOutput.emitWatermark(new Watermark(5));
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), is(nullValue()));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isEqualTo(nullValue());

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.lastWatermark()).isNull();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -241,12 +236,12 @@ public void multipleDeferredWatermark() {
 
         multiplexer.onPeriodicEmit();
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), is(watermark(2)));
-        assertThat(underlyingWatermarkOutput.isIdle(), is(false));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isEqualTo(watermark(2));
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(false);

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.isIdle()).isFalse();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -301,11 +296,11 @@ public void lowerImmediateUpdateOnSameOutputDoesNotEmitCombinedUpdate() {
         deferredOutput.emitWatermark(new Watermark(5));
         immediateOutput.emitWatermark(new Watermark(2));
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), is(nullValue()));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isEqualTo(nullValue());

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.lastWatermark()).isNull();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/io/EnumerateNestedFilesTest.java:
##########
@@ -26,15 +26,17 @@
 import org.apache.flink.types.IntValue;
 
 import org.junit.After;
-import org.junit.Assert;
 import org.junit.Before;
 import org.junit.Rule;
-import org.junit.Test;
+import org.junit.jupiter.api.Test;
 import org.junit.rules.TemporaryFolder;
 
 import java.io.File;
 import java.io.IOException;
 
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.junit.jupiter.api.Assertions.fail;
+
 public class EnumerateNestedFilesTest {
 
     @Rule public TemporaryFolder tempFolder = new TemporaryFolder();

Review Comment:
   ```suggestion
       @TempDir private Path temporaryFolder;
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -186,12 +181,12 @@ public void singleDeferredWatermark() {
         watermarkOutput.emitWatermark(new Watermark(0));
         multiplexer.onPeriodicEmit();
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), is(watermark(0)));
-        assertThat(underlyingWatermarkOutput.isIdle(), is(false));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isEqualTo(watermark(0));
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(false);

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.isIdle()).isFalse();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -93,12 +88,12 @@ public void multipleImmediateWatermark() {
         watermarkOutput2.emitWatermark(new Watermark(5));
         watermarkOutput3.markIdle();
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), is(watermark(2)));
-        assertThat(underlyingWatermarkOutput.isIdle(), is(false));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isEqualTo(watermark(2));
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(false);

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.isIdle()).isFalse();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -58,29 +53,29 @@ public void singleImmediateIdleness() {
 
         watermarkOutput.markIdle();
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), nullValue());
-        assertThat(underlyingWatermarkOutput.isIdle(), is(true));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isNull();
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(true);
     }
 
     @Test
-    public void singleImmediateWatermarkAfterIdleness() {
+    void singleImmediateWatermarkAfterIdleness() {
         TestingWatermarkOutput underlyingWatermarkOutput = createTestingWatermarkOutput();
         WatermarkOutputMultiplexer multiplexer =
                 new WatermarkOutputMultiplexer(underlyingWatermarkOutput);
 
         WatermarkOutput watermarkOutput = createImmediateOutput(multiplexer);
 
         watermarkOutput.markIdle();
-        assertThat(underlyingWatermarkOutput.isIdle(), is(true));
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(true);
 
         watermarkOutput.emitWatermark(new Watermark(0));
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), is(watermark(0)));
-        assertThat(underlyingWatermarkOutput.isIdle(), is(false));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isEqualTo(watermark(0));
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(false);

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.isIdle()).isFalse();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -44,12 +39,12 @@ public void singleImmediateWatermark() {
 
         watermarkOutput.emitWatermark(new Watermark(0));
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), is(watermark(0)));
-        assertThat(underlyingWatermarkOutput.isIdle(), is(false));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isEqualTo(watermark(0));
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(false);

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.isIdle()).isFalse();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -58,29 +53,29 @@ public void singleImmediateIdleness() {
 
         watermarkOutput.markIdle();
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), nullValue());
-        assertThat(underlyingWatermarkOutput.isIdle(), is(true));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isNull();
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(true);
     }
 
     @Test
-    public void singleImmediateWatermarkAfterIdleness() {
+    void singleImmediateWatermarkAfterIdleness() {
         TestingWatermarkOutput underlyingWatermarkOutput = createTestingWatermarkOutput();
         WatermarkOutputMultiplexer multiplexer =
                 new WatermarkOutputMultiplexer(underlyingWatermarkOutput);
 
         WatermarkOutput watermarkOutput = createImmediateOutput(multiplexer);
 
         watermarkOutput.markIdle();
-        assertThat(underlyingWatermarkOutput.isIdle(), is(true));
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(true);

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.isIdle()).isTrue();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -145,19 +140,19 @@ public void combinedWatermarkDoesNotRegressWhenIdleOutputRegresses() {
      * when there are no splits assigned and the combined watermark is at its initial value.
      */
     @Test
-    public void noCombinedDeferredUpdateWhenWeHaveZeroOutputs() {
+    void noCombinedDeferredUpdateWhenWeHaveZeroOutputs() {
         TestingWatermarkOutput underlyingWatermarkOutput = createTestingWatermarkOutput();
         WatermarkOutputMultiplexer multiplexer =
                 new WatermarkOutputMultiplexer(underlyingWatermarkOutput);
 
         multiplexer.onPeriodicEmit();
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), is(nullValue()));
-        assertThat(underlyingWatermarkOutput.isIdle(), is(false));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isEqualTo(nullValue());
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(false);

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.isIdle()).isFalse();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -216,17 +211,17 @@ public void singleDeferredWatermarkAfterIdleness() {
         watermarkOutput.markIdle();
         multiplexer.onPeriodicEmit();
 
-        assertThat(underlyingWatermarkOutput.isIdle(), is(true));
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(true);

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.isIdle()).isTrue();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -201,12 +196,12 @@ public void singleDeferredIdleness() {
         watermarkOutput.markIdle();
         multiplexer.onPeriodicEmit();
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), nullValue());
-        assertThat(underlyingWatermarkOutput.isIdle(), is(true));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isNull();
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(true);

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.isIdle()).isTrue();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -216,17 +211,17 @@ public void singleDeferredWatermarkAfterIdleness() {
         watermarkOutput.markIdle();
         multiplexer.onPeriodicEmit();
 
-        assertThat(underlyingWatermarkOutput.isIdle(), is(true));
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(true);
 
         watermarkOutput.emitWatermark(new Watermark(0));
         multiplexer.onPeriodicEmit();
 
-        assertThat(underlyingWatermarkOutput.lastWatermark(), is(watermark(0)));
-        assertThat(underlyingWatermarkOutput.isIdle(), is(false));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isEqualTo(watermark(0));
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(false);

Review Comment:
   ```suggestion
           assertThat(underlyingWatermarkOutput.isIdle()).isFalse();
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkOutputMultiplexerTest.java:
##########
@@ -395,8 +393,8 @@ public void testNotEmittingIdleAfterAllSplitsRemoved() {
         multiplexer.unregisterOutput(id);
 
         multiplexer.onPeriodicEmit();
-        assertThat(underlyingWatermarkOutput.lastWatermark(), equalTo(emittedWatermark));
-        assertThat(underlyingWatermarkOutput.isIdle(), equalTo(false));
+        assertThat(underlyingWatermarkOutput.lastWatermark()).isEqualTo(emittedWatermark);
+        assertThat(underlyingWatermarkOutput.isIdle()).isEqualTo(false);

Review Comment:
   same as above.



##########
flink-core/src/test/java/org/apache/flink/api/common/eventtime/WatermarkStrategyTest.java:
##########
@@ -164,19 +160,15 @@ public void testWithWatermarkAlignment() {
         ClosureCleaner.clean(strategy, ExecutionConfig.ClosureCleanerLevel.RECURSIVE, true);
 
         final WatermarkAlignmentParams alignmentParameters = strategy.getAlignmentParameters();
-        assertThat(alignmentParameters.getWatermarkGroup(), equalTo(watermarkGroup));
-        assertThat(
-                alignmentParameters.getMaxAllowedWatermarkDrift(),
-                equalTo(maxAllowedWatermarkDrift.toMillis()));
-        assertThat(
-                alignmentParameters.getUpdateInterval(),
-                equalTo(WatermarksWithWatermarkAlignment.DEFAULT_UPDATE_INTERVAL.toMillis()));
-        assertThat(
-                strategy.createTimestampAssigner(assignerContext()),
-                instanceOf(RecordTimestampAssigner.class));
-        assertThat(
-                strategy.createWatermarkGenerator(generatorContext()),
-                instanceOf(WatermarksWithIdleness.class));
+        assertThat(alignmentParameters.getWatermarkGroup()).isEqualTo(watermarkGroup);
+        assertThat(equalTo(maxAllowedWatermarkDrift.toMillis()))
+                .isEqualTo(alignmentParameters.getMaxAllowedWatermarkDrift());
+        assertThat(equalTo(WatermarksWithWatermarkAlignment.DEFAULT_UPDATE_INTERVAL.toMillis()))
+                .isEqualTo(alignmentParameters.getUpdateInterval());
+        assertThat(instanceOf(RecordTimestampAssigner.class))
+                .isEqualTo(strategy.createTimestampAssigner(assignerContext()));
+        assertThat(instanceOf(WatermarksWithIdleness.class))
+                .isEqualTo(strategy.createWatermarkGenerator(generatorContext()));

Review Comment:
   `equalTo` can be removed.



##########
flink-core/src/test/java/org/apache/flink/api/common/functions/util/RuntimeUDFContextTest.java:
##########
@@ -95,36 +93,36 @@ public void testBroadcastVariableSimple() {
             ctx.setBroadcastVariable("name1", Arrays.asList(1, 2, 3, 4));
             ctx.setBroadcastVariable("name2", Arrays.asList(1.0, 2.0, 3.0, 4.0));
 
-            assertTrue(ctx.hasBroadcastVariable("name1"));
-            assertTrue(ctx.hasBroadcastVariable("name2"));
+            assertThat(ctx.hasBroadcastVariable("name1")).isTrue();
+            assertThat(ctx.hasBroadcastVariable("name2")).isTrue();
 
             List<Integer> list1 = ctx.getBroadcastVariable("name1");
             List<Double> list2 = ctx.getBroadcastVariable("name2");
 
-            assertEquals(Arrays.asList(1, 2, 3, 4), list1);
-            assertEquals(Arrays.asList(1.0, 2.0, 3.0, 4.0), list2);
+            assertThat(list1).isEqualTo(Arrays.asList(1, 2, 3, 4));
+            assertThat(list2).isEqualTo(Arrays.asList(1.0, 2.0, 3.0, 4.0));

Review Comment:
   ```suggestion
               assertThat(list1).containsExactly(1, 2, 3, 4);
               assertThat(list2).containsExactly(1.0, 2.0, 3.0, 4.0);
   ```



##########
flink-core/src/test/java/org/apache/flink/api/common/io/DelimitedInputFormatSamplingTest.java:
##########
@@ -72,7 +75,7 @@ public class DelimitedInputFormatSamplingTest {
     //  Setup
     // ========================================================================
 
-    @BeforeClass
+    @BeforeAll
     public static void initialize() {

Review Comment:
   ```suggestion
       static void initialize() {
   ```



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


[GitHub] [flink] reswqa commented on a diff in pull request #19563: [WIP][FLINK-25537] [JUnit5 Migration] Module: flink-core

Posted by GitBox <gi...@apache.org>.
reswqa commented on code in PR #19563:
URL: https://github.com/apache/flink/pull/19563#discussion_r857131608


##########
flink-core/src/test/java/org/apache/flink/api/common/accumulators/AverageAccumulatorTest.java:
##########
@@ -94,20 +93,20 @@ public void testMergeSuccess() {
         }
 
         avg1.merge(avg2);
-        assertEquals(4.5, avg1.getLocalValue(), 0.0);
+        assertThat(4.5, avg1.getLocalValue(), 0.0);
     }
 
     @Test
-    public void testMergeFailed() {
+    void testMergeFailed() {
         AverageAccumulator average = new AverageAccumulator();
         Accumulator<Double, Double> averageNew = null;
         average.add(1);
         try {
             average.merge(averageNew);
             fail("should fail with an exception");
         } catch (IllegalArgumentException e) {
-            assertNotNull(e.getMessage());

Review Comment:
   Might replace this code block by assertThatThrownBy



-- 
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] [WIP][FLINK-25537] [JUnit5 Migration] Module: flink-core [flink]

Posted by "GOODBOY008 (via GitHub)" <gi...@apache.org>.
GOODBOY008 closed pull request #19563: [WIP][FLINK-25537]  [JUnit5 Migration] Module: flink-core
URL: https://github.com/apache/flink/pull/19563


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


[GitHub] [flink] GOODBOY008 commented on pull request #19563: [WIP][FLINK-25537] [JUnit5 Migration] Module: flink-core

Posted by GitBox <gi...@apache.org>.
GOODBOY008 commented on PR #19563:
URL: https://github.com/apache/flink/pull/19563#issuecomment-1129643606

   > Hi @GOODBOY008 in case you are still willing to continue with this PR #19667 was merged. It should significantly ease migration of `SerializerTestBase ` successors. So makes sense to rebase.
   
   Ok, I  will rebase my branch.


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


[GitHub] [flink] snuyanzin commented on pull request #19563: [WIP][FLINK-25537] [JUnit5 Migration] Module: flink-core

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #19563:
URL: https://github.com/apache/flink/pull/19563#issuecomment-1129629344

   Hi @GOODBOY008 in case you are still willing to continue with this PR
   https://github.com/apache/flink/pull/19667 was merged. It should significantly ease migration of `SerializerTestBase ` successors.
   So makes sense to rebase.
   
   


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