snuyanzin commented on code in PR #27668:
URL: https://github.com/apache/flink/pull/27668#discussion_r2967060547
##########
flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTriggerSavepointITCase.java:
##########
@@ -233,21 +230,22 @@ public void testDoNotCancelJobIfSavepointFails(
Assumptions.assumeTrue(e == null);
}
- try {
- cancelWithSavepoint(clusterClient);
- } catch (Exception e) {
- assertThat(
- ExceptionUtils.findThrowable(e,
CheckpointException.class).isPresent(),
- equalTo(true));
- }
+ assertThatThrownBy(() -> cancelWithSavepoint(clusterClient))
+ .satisfies(
+ throwable -> {
+ assertThat(
+ ExceptionUtils.findThrowable(
+ throwable,
CheckpointException.class))
+ .isPresent();
+ });
final JobStatus jobStatus =
clusterClient.getJobStatus(jobGraph.getJobID()).get(60,
TimeUnit.SECONDS);
- assertThat(jobStatus, equalTo(JobStatus.RUNNING));
+ assertThat(jobStatus).isEqualTo(JobStatus.RUNNING);
// assert that checkpoints are continued to be triggered
triggerCheckpointLatch = new CountDownLatch(1);
- assertThat(triggerCheckpointLatch.await(60L, TimeUnit.SECONDS),
equalTo(true));
+ assertThat(triggerCheckpointLatch.await(60L,
TimeUnit.SECONDS)).isEqualTo(true);
Review Comment:
```suggestion
assertThat(triggerCheckpointLatch.await(60L,
TimeUnit.SECONDS)).isTrue();
```
--
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]