Jiabao-Sun commented on code in PR #23200: URL: https://github.com/apache/flink/pull/23200#discussion_r1299313467
########## flink-runtime/src/test/java/org/apache/flink/runtime/io/disk/BatchShuffleReadBufferPoolTest.java: ########## @@ -220,52 +219,52 @@ public void testMultipleThreadRequestAndRecycle() throws Exception { requestThread.join(); } - assertNull(exception.get()); - assertEquals(bufferPool.getNumTotalBuffers(), bufferPool.getAvailableBuffers()); + assertThat(exception.get()).isNull(); Review Comment: Thanks @X-czh. But I think we can't assert the `AtomicReference` is null directly. ``` org.opentest4j.AssertionFailedError: expected: null but was: AtomicReference[null] Expected :null Actual :AtomicReference[null] ``` ########## flink-runtime/src/test/java/org/apache/flink/runtime/io/network/buffer/LocalBufferPoolDestroyTest.java: ########## @@ -20,30 +20,24 @@ import org.apache.flink.runtime.execution.CancelTaskException; -import org.junit.Test; +import org.junit.jupiter.api.Test; -import java.io.IOException; import java.util.concurrent.atomic.AtomicReference; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; -import static org.junit.Assert.fail; +import static org.assertj.core.api.Assertions.assertThat; +import static org.assertj.core.api.Assertions.assertThatThrownBy; /** Tests for the destruction of a {@link LocalBufferPool}. */ public class LocalBufferPoolDestroyTest { Review Comment: The static method `isInBlockingBufferRequest` is referenced by different package class `org.apache.flink.runtime.io.network.partition.ResultPartitionTest` and `org.apache.flink.runtime.taskmanager.TaskCancelAsyncProducerConsumerITCase`. -- 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