rkhachatryan commented on a change in pull request #15550:
URL: https://github.com/apache/flink/pull/15550#discussion_r610724355



##########
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:
       Makes sense.




-- 
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]


Reply via email to