Jiabao-Sun commented on code in PR #23200: URL: https://github.com/apache/flink/pull/23200#discussion_r1295845608
########## flink-runtime/src/test/java/org/apache/flink/runtime/io/network/api/writer/RecordWriterTest.java: ########## @@ -309,19 +297,19 @@ public void testIsAvailableOrNot() throws Exception { try { // record writer is available because of initial available global pool - assertTrue(recordWriter.getAvailableFuture().isDone()); + assertThat(recordWriter.getAvailableFuture().isDone()).isTrue(); // request one buffer from the local pool to make it unavailable afterwards try (BufferBuilder bufferBuilder = localPool.requestBufferBuilder(0)) { - assertNotNull(bufferBuilder); - assertFalse(recordWriter.getAvailableFuture().isDone()); + assertThat(bufferBuilder).isNotNull(); + assertThat(recordWriter.getAvailableFuture().isDone()).isFalse(); // recycle the buffer to make the local pool available again final Buffer buffer = BufferBuilderTestUtils.buildSingleBuffer(bufferBuilder); buffer.recycleBuffer(); } - assertTrue(recordWriter.getAvailableFuture().isDone()); - assertEquals(recordWriter.AVAILABLE, recordWriter.getAvailableFuture()); + assertThat(recordWriter.getAvailableFuture().isDone()).isTrue(); Review Comment: Thanks for catching this! ########## flink-runtime/src/test/java/org/apache/flink/runtime/io/network/api/writer/RecordWriterTest.java: ########## @@ -309,19 +297,19 @@ public void testIsAvailableOrNot() throws Exception { try { // record writer is available because of initial available global pool - assertTrue(recordWriter.getAvailableFuture().isDone()); + assertThat(recordWriter.getAvailableFuture().isDone()).isTrue(); // request one buffer from the local pool to make it unavailable afterwards try (BufferBuilder bufferBuilder = localPool.requestBufferBuilder(0)) { - assertNotNull(bufferBuilder); - assertFalse(recordWriter.getAvailableFuture().isDone()); + assertThat(bufferBuilder).isNotNull(); + assertThat(recordWriter.getAvailableFuture().isDone()).isFalse(); 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