Myasuka commented on a change in pull request #14662:
URL: https://github.com/apache/flink/pull/14662#discussion_r586059302
##########
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:
This test ensure the throwable contains message from `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]