snuyanzin commented on code in PR #28261:
URL: https://github.com/apache/flink/pull/28261#discussion_r3332194627


##########
flink-state-backends/flink-statebackend-forst/src/test/java/org/apache/flink/state/forst/ForStIncrementalCheckpointRescalingTest.java:
##########
@@ -35,109 +35,111 @@
 import org.apache.flink.streaming.runtime.streamrecord.StreamRecord;
 import org.apache.flink.streaming.util.AbstractStreamOperatorTestHarness;
 import org.apache.flink.streaming.util.KeyedOneInputStreamOperatorTestHarness;
+import org.apache.flink.testutils.junit.extensions.parameterized.Parameter;
+import 
org.apache.flink.testutils.junit.extensions.parameterized.ParameterizedTestExtension;
+import org.apache.flink.testutils.junit.extensions.parameterized.Parameters;
+import org.apache.flink.testutils.junit.utils.TempDirUtils;
 import org.apache.flink.util.Collector;
-import org.apache.flink.util.TestLogger;
 
-import org.junit.Assert;
-import org.junit.Before;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
-import org.junit.runner.RunWith;
-import org.junit.runners.Parameterized;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.TestTemplate;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.jupiter.api.io.TempDir;
 
+import java.nio.file.Path;
 import java.util.Arrays;
 import java.util.Collection;
 import java.util.List;
 
 import static 
org.apache.flink.state.forst.ForStConfigurableOptions.USE_INGEST_DB_RESTORE_MODE;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /** Tests to guard rescaling from checkpoint. */
-@RunWith(Parameterized.class)
-public class ForStIncrementalCheckpointRescalingTest extends TestLogger {
+@ExtendWith(ParameterizedTestExtension.class)
+class ForStIncrementalCheckpointRescalingTest {
 
-    @Rule public TemporaryFolder rootFolder = new TemporaryFolder();
+    @TempDir Path rootFolder;
 
-    @Parameterized.Parameters(name = "useIngestDbRestoreMode: {0}")
+    @Parameters(name = "useIngestDbRestoreMode: {0}")
     public static Collection<Boolean> parameters() {
         return Arrays.asList(false, true);
     }
 
-    @Parameterized.Parameter public boolean useIngestDbRestoreMode;
+    @Parameter public boolean useIngestDbRestoreMode;
 
     private final int maxParallelism = 10;
 
     private final KeySelector<String, String> keySelector = new 
TestKeySelector();
 
     private String[] records;
 
-    @Before
-    public void initRecords() throws Exception {
+    @BeforeEach
+    void initRecords() throws Exception {
         records = new String[10];
         records[0] = "8";
-        Assert.assertEquals(
-                0,
-                KeyGroupRangeAssignment.assignToKeyGroup(
-                        keySelector.getKey(records[0]), maxParallelism)); // 
group 0
+        assertThat(
+                        KeyGroupRangeAssignment.assignToKeyGroup(
+                                keySelector.getKey(records[0]), 
maxParallelism))
+                .isEqualTo(0); // group 0

Review Comment:
   ```suggestion
                   .isZero(); // group 0
   ```



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