Jiabao-Sun commented on code in PR #23200: URL: https://github.com/apache/flink/pull/23200#discussion_r1295840799
########## 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: I'm afraid not. It will be set true in constructor of `BroadcastRecordWriterTest`. This change was made because Junit5 only allows a single constructor. ```java class BroadcastRecordWriterTest extends RecordWriterTest { BroadcastRecordWriterTest() { this.isBroadcastWriter = true; } } ``` ########## flink-runtime/src/test/java/org/apache/flink/runtime/io/network/api/writer/RecordWriterDelegateTest.java: ########## @@ -157,9 +154,9 @@ private void verifyAvailability(RecordWriterDelegate writerDelegate) throws Exce Buffer buffer = readView.getNextBuffer().buffer(); buffer.recycleBuffer(); - assertTrue(future.isDone()); - assertTrue(writerDelegate.isAvailable()); - assertTrue(writerDelegate.getAvailableFuture().isDone()); + assertThat(future.isDone()).isTrue(); + assertThat(writerDelegate.isAvailable()).isTrue(); + assertThat(writerDelegate.getAvailableFuture().isDone()).isTrue(); Review Comment: Thanks for catching this! -- 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