tillrohrmann commented on a change in pull request #14662:
URL: https://github.com/apache/flink/pull/14662#discussion_r585721398
##########
File path:
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterTest.java
##########
@@ -353,13 +359,17 @@ public void declineCheckpoint(DeclineCheckpoint
declineCheckpoint) {
RpcCheckpointResponder rpcCheckpointResponder =
new RpcCheckpointResponder(jobMasterGateway);
rpcCheckpointResponder.declineCheckpoint(
- jobGraph.getJobID(), new ExecutionAttemptID(), 1,
userException);
+ jobGraph.getJobID(), new ExecutionAttemptID(), 1,
checkpointException);
Throwable throwable =
declineCheckpointMessageFuture.get(
testingTimeout.toMilliseconds(),
TimeUnit.MILLISECONDS);
- assertThat(throwable, instanceOf(SerializedThrowable.class));
- assertThat(throwable.getMessage(),
equalTo(userException.getMessage()));
+ assertThat(throwable, instanceOf(CheckpointException.class));
+ Optional<Throwable> throwableWithMessage =
+ ExceptionUtils.findThrowableWithMessage(throwable,
userException.getMessage());
+ assertTrue(throwableWithMessage.isPresent());
+ assertThat(
+ throwableWithMessage.get().getMessage(),
equalTo(userException.getMessage()));
Review comment:
Quick question concerning this test @Myasuka: What is this test testing
after your changes? To me it looks as if we are testing that `new
CheckpointException(CheckpointFailureReason.CHECKPOINT_DECLINED,
userException);` correctly transports the `userException`.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]