1996fanrui commented on code in PR #23200:
URL: https://github.com/apache/flink/pull/23200#discussion_r1295862065


##########
flink-runtime/src/test/java/org/apache/flink/runtime/io/network/api/writer/RecordWriterTest.java:
##########
@@ -51,43 +51,31 @@
 import org.apache.flink.types.IntValue;
 import org.apache.flink.util.XORShiftRandom;
 
-import org.junit.Assert;
-import org.junit.Rule;
-import org.junit.Test;
-import org.junit.rules.TemporaryFolder;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
 
+import java.io.File;
 import java.io.IOException;
 import java.util.ArrayDeque;
 import java.util.Random;
 
 import static 
org.apache.flink.runtime.io.network.partition.PartitionTestUtils.createPartition;
-import static org.junit.Assert.assertEquals;
-import static org.junit.Assert.assertFalse;
-import static org.junit.Assert.assertNotNull;
-import static org.junit.Assert.assertTrue;
+import static org.assertj.core.api.Assertions.assertThat;
 
 /** Tests for the {@link RecordWriter}. */
-public class RecordWriterTest {
+class RecordWriterTest {
 
-    private final boolean isBroadcastWriter;
+    boolean isBroadcastWriter = false;

Review Comment:
   It's not safe to change the parent field.
   
   The master code is fine to me:
   
   ```
       private final boolean isBroadcastWriter;
   
       public RecordWriterTest() {
           this(false);
       }
   
       RecordWriterTest(boolean isBroadcastWriter) {
           this.isBroadcastWriter = isBroadcastWriter;
       }
   ```



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

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

Reply via email to