fredia commented on code in PR #20420:
URL: https://github.com/apache/flink/pull/20420#discussion_r935512114
##########
flink-tests/src/test/java/org/apache/flink/test/checkpointing/RescaleCheckpointManuallyITCase.java:
##########
@@ -322,10 +289,14 @@ public void run(SourceContext<Integer> ctx) throws
Exception {
counter++;
}
} else {
- if (terminateAfterEmission) {
- running = false;
+ while (completedCheckpointNum.get() <= 1) {
+ Thread.sleep(50);
+ }
+ if (failAfterEmission) {
+ throw new FlinkRuntimeException(
+ "Make job fail artificially, to retain
completed checkpoint.");
Review Comment:
Because `RETAIN_ON_CANCELLATION` only takes effects in the case of "job is
cancelled or fails".
Replace `MiniCluster.cancel()` with failing the job.
--
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]