pnowojski commented on a change in pull request #8731: [FLINK-11878][runtime] 
Implement the runtime handling of BoundedOneInput and BoundedMultiInput
URL: https://github.com/apache/flink/pull/8731#discussion_r293722745
 
 

 ##########
 File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/OneInputStreamTaskTest.java
 ##########
 @@ -597,6 +603,54 @@ public void testQuiesceTimerServiceAfterOpClose() throws 
Exception {
                timeService.shutdownService();
        }
 
+       @Test
+       public void testHandlingEndOfInput() throws Exception {
+               final OneInputStreamTaskTestHarness<String, String> testHarness 
= new OneInputStreamTaskTestHarness<>(
+                       OneInputStreamTask::new,
+                       2, 2,
+                       BasicTypeInfo.STRING_TYPE_INFO, 
BasicTypeInfo.STRING_TYPE_INFO);
+
+               testHarness
+                       .setupOperatorChain(new OperatorID(), new 
TestBoundedOneInputOperator("Operator0"))
+                       .chain(
+                               new OperatorID(),
+                               new TestBoundedOneInputOperator("Operator1"),
+                               
BasicTypeInfo.STRING_TYPE_INFO.createSerializer(new ExecutionConfig()))
+                       .finish();
+
+               ConcurrentLinkedQueue<Object> expectedOutput = new 
ConcurrentLinkedQueue<>();
+
+               testHarness.invoke();
+               testHarness.waitForTaskRunning();
+
+               TestBoundedOneInputOperator headOperator = 
(TestBoundedOneInputOperator) testHarness.getTask().headOperator;
+
+               testHarness.processElement(new StreamRecord<>("Hello-0-0"), 0, 
0);
 
 Review comment:
   Why are you passing `inputGate` and `channel` parameters? does it matter 
from where did the element come from? 

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


With regards,
Apache Git Services

Reply via email to