You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/11/24 12:15:51 UTC

[GitHub] [flink] 1996fanrui commented on a diff in pull request #21368: [FLINK-30165][runtime][JUnit5 Migration] Migrate unaligned checkpoint related tests under flink-runtime module to junit5

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


##########
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/channel/ChannelStateWriterImplTest.java:
##########
@@ -135,145 +145,200 @@ public void testAbortOldAndStartNewCheckpoint() throws Exception {
                     worker.processAllRequests();
 
                     ChannelStateWriteResult result42 = writer.getAndRemoveWriteResult(checkpoint42);
-                    assertTrue(result42.isDone());
+                    assertThat(result42.isDone()).isTrue();
                     try {
                         result42.getInputChannelStateHandles().get();
                         fail("The result should have failed.");
                     } catch (Throwable throwable) {
-                        assertTrue(findThrowable(throwable, TestException.class).isPresent());
+                        assertThat(findThrowable(throwable, TestException.class).isPresent())
+                                .isTrue();

Review Comment:
   Change to this:
   
   ```
                       assertThatThrownBy(() -> result42.getInputChannelStateHandles().get())
                               .as("The result should have failed.")
                               .hasCauseInstanceOf(TestException.class);
   ```



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

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