Clarkkkkk commented on a change in pull request #7780: [FLINK-11593][tests] 
Check & port TaskManagerTest to new code base
URL: https://github.com/apache/flink/pull/7780#discussion_r261063760
 
 

 ##########
 File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/jobmaster/TestingAbstractInvokables.java
 ##########
 @@ -82,4 +84,94 @@ public void invoke() throws Exception {
                        }
                }
        }
+
+       /**
+        * Test invokable which blocks after invoke was called.
+        */
+       public static class BlockingInvokable extends AbstractInvokable {
+
+               public BlockingInvokable(Environment environment) {
+                       super(environment);
+               }
+
+               @Override
+               public void invoke() throws Exception {
+                       final Object o = new Object();
+                       //noinspection 
SynchronizationOnLocalVariableOrMethodParameter
+                       synchronized (o) {
+                               //noinspection InfiniteLoopStatement
+                               while (true) {
+                                       o.wait();
+                               }
+                       }
+               }
+
+       }
+
+       /**
+        * Test invokable use the input gate of index 0.
+        */
+       public static class AgnosticReceiver extends AbstractInvokable{
 
 Review comment:
   @TisonKun My initial intention is to use the java version and remove the 
scala version of AgnosticReceiver, but to avoid mix two issues, I will change 
it to the scala version.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to