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/05/02 16:52:31 UTC

[GitHub] [flink] zentol opened a new pull request, #19625: [FLINK-27470][state][tests] Migrate test to JUnit5

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

   Migrate heap-spillable statebackend tests to junit5.


-- 
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 a diff in pull request #19625: [FLINK-27470][state][tests] Migrate test to JUnit5

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


##########
flink-state-backends/flink-statebackend-heap-spillable/src/test/java/org/apache/flink/runtime/state/heap/OnHeapLevelIndexHeaderTest.java:
##########
@@ -20,65 +20,64 @@
 
 package org.apache.flink.runtime.state.heap;
 
-import org.apache.flink.util.TestLogger;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import java.util.concurrent.ThreadLocalRandom;
 
 import static org.apache.flink.runtime.state.heap.SkipListUtils.DEFAULT_LEVEL;
 import static org.apache.flink.runtime.state.heap.SkipListUtils.MAX_LEVEL;
 import static org.apache.flink.runtime.state.heap.SkipListUtils.NIL_NODE;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
 /** Tests for {@link OnHeapLevelIndexHeader}. */
-public class OnHeapLevelIndexHeaderTest extends TestLogger {
+public class OnHeapLevelIndexHeaderTest {

Review Comment:
   Probably it could be package private



##########
flink-state-backends/flink-statebackend-heap-spillable/src/test/java/org/apache/flink/runtime/state/heap/OnHeapLevelIndexHeaderTest.java:
##########
@@ -20,65 +20,64 @@
 
 package org.apache.flink.runtime.state.heap;
 
-import org.apache.flink.util.TestLogger;
-
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Test;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
 
 import java.util.concurrent.ThreadLocalRandom;
 
 import static org.apache.flink.runtime.state.heap.SkipListUtils.DEFAULT_LEVEL;
 import static org.apache.flink.runtime.state.heap.SkipListUtils.MAX_LEVEL;
 import static org.apache.flink.runtime.state.heap.SkipListUtils.NIL_NODE;
+import static org.assertj.core.api.Assertions.assertThat;
+import static org.assertj.core.api.Assertions.assertThatThrownBy;
 
 /** Tests for {@link OnHeapLevelIndexHeader}. */
-public class OnHeapLevelIndexHeaderTest extends TestLogger {
+public class OnHeapLevelIndexHeaderTest {
     private static final ThreadLocalRandom random = ThreadLocalRandom.current();
 
     private OnHeapLevelIndexHeader heapHeadIndex;
 
-    @Before
+    @BeforeEach
     public void setUp() {

Review Comment:
   Probably it could be package private



##########
flink-state-backends/flink-statebackend-heap-spillable/src/test/java/org/apache/flink/runtime/state/heap/CopyOnWriteSkipListStateMapComplexOpTest.java:
##########
@@ -102,7 +96,7 @@ public String filterOrTransform(@Nullable String value) {
     private CopyOnWriteSkipListStateMap<Integer, Long, String> stateMapWithStates;
     private Map<Long, Map<Integer, String>> referenceStates;
 
-    @Before
+    @BeforeEach
     public void setUp() {

Review Comment:
   It seems package-private should be ok here



-- 
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 #19625: [FLINK-27470][state][tests] Migrate test to JUnit5

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

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "af9a16c05ede67d1bf1cae9a2cc234b6a7205ed5",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "af9a16c05ede67d1bf1cae9a2cc234b6a7205ed5",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * af9a16c05ede67d1bf1cae9a2cc234b6a7205ed5 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


[GitHub] [flink] zentol merged pull request #19625: [FLINK-27470][state][tests] Migrate test to JUnit5

Posted by GitBox <gi...@apache.org>.
zentol merged PR #19625:
URL: https://github.com/apache/flink/pull/19625


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