snuyanzin commented on code in PR #22632:
URL: https://github.com/apache/flink/pull/22632#discussion_r1204202647
##########
flink-runtime/src/test/java/org/apache/flink/runtime/checkpoint/ZooKeeperCompletedCheckpointStoreTest.java:
##########
@@ -101,13 +102,11 @@ public void testRecoverFailsIfDownloadFails() {
id -> {
throw new ExpectedTestException();
}));
- final Exception exception =
- assertThrows(
- Exception.class,
+ assertThatThrownBy(
() ->
DefaultCompletedCheckpointStoreUtils.retrieveCompletedCheckpoints(
- checkpointsInZooKeeper,
zooKeeperCheckpointStoreUtil));
- assertThat(exception,
FlinkMatchers.containsCause(ExpectedTestException.class));
+ checkpointsInZooKeeper,
zooKeeperCheckpointStoreUtil))
+ .satisfies(exp ->
FlinkAssertions.anyCauseMatches(ExpectedTestException.class));
Review Comment:
```suggestion
.satisfies(FlinkAssertions.anyCauseMatches(ExpectedTestException.class));
```
lambda is probably useless here.
I tried replace `ExpectedTestException` with `NumberFormatException` and
test still passes...
After removal of lambda it works better
--
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]