tillrohrmann commented on a change in pull request #14662:
URL: https://github.com/apache/flink/pull/14662#discussion_r586397903
##########
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:
Hmm to me it looks as if this test actually tests that
`DeclineCheckpoint` sends the user exception in a serialized format. This
should be testable w/o starting a JM and two `ActorSystems`.
----------------------------------------------------------------
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]