1996fanrui commented on code in PR #27119:
URL: https://github.com/apache/flink/pull/27119#discussion_r2542189639
##########
flink-tests/src/test/java/org/apache/flink/test/checkpointing/UnalignedCheckpointTestBase.java:
##########
@@ -184,24 +186,28 @@ protected File execute(UnalignedSettings settings) throws
Exception {
final CompletableFuture<JobSubmissionResult> result =
miniCluster.getMiniCluster().submitJob(streamGraph.getJobGraph());
+ final JobID jobID = result.get().getJobID();
checkCounters(
miniCluster
.getMiniCluster()
- .requestJobResult(result.get().getJobID())
+ .requestJobResult(jobID)
.get()
.toJobExecutionResult(getClass().getClassLoader()));
System.out.println(
"Finished " + getClass().getCanonicalName() + "#" +
name.getMethodName() + ".");
+ if (settings.generateCheckpoint) {
+ return CommonTestUtils.getLatestCompletedCheckpointPath(
+ jobID, miniCluster.getMiniCluster())
+ .map(File::new)
+ .orElseThrow(() -> new AssertionError("Could not
generate checkpoint"));
+ }
} catch (Exception e) {
- if (!ExceptionUtils.findThrowable(e,
TestException.class).isPresent()) {
+ if (ExceptionUtils.findThrowable(e,
TestException.class).isEmpty()) {
throw e;
}
Review Comment:
Find latest checkpoint should be placed in catch block as well, right?
The `TestException` always happen in the test, it caused empty file is
returned.
--
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]