dawidwys commented on a change in pull request #15550:
URL: https://github.com/apache/flink/pull/15550#discussion_r610713471
##########
File path:
flink-tests/src/test/java/org/apache/flink/runtime/jobmaster/JobMasterStopWithSavepointITCase.java
##########
@@ -384,24 +380,28 @@ protected void
processInput(MailboxDefaultAction.Controller controller) throws E
/** A {@link StreamTask} that simply waits to be terminated normally. */
public static class NoOpBlockingStreamTask extends NoOpStreamTask {
- private final transient OneShotLatch finishLatch;
+ private transient MailboxDefaultAction.Suspension suspension;
public NoOpBlockingStreamTask(final Environment environment) throws
Exception {
super(environment);
- this.finishLatch = new OneShotLatch();
}
@Override
protected void processInput(MailboxDefaultAction.Controller
controller) throws Exception {
invokeLatch.countDown();
- finishLatch.await();
- controller.allActionsCompleted();
+ if (suspension == null) {
+ suspension = controller.suspendDefaultAction();
+ } else {
+ controller.allActionsCompleted();
+ }
Review comment:
No. The tests were/are verifying behaviour after triggering stop with
savepoint. (If the job finishes/fails/continues etc.)
The blocking was supposed to keep the task running until the `finishTask` is
called. With my changes it still maintains that expected behaviour. Only when
`finishTask` is called we report to the `mailbox` that we won't produce any
more records.
--
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]