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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]