AHeise commented on a change in pull request #10435: [FLINK-13955][runtime] 
migrate ContinuousFileReaderOperator to the mailbox execution model
URL: https://github.com/apache/flink/pull/10435#discussion_r370040258
 
 

 ##########
 File path: 
flink-fs-tests/src/test/java/org/apache/flink/hdfstests/ContinuousFileProcessingTest.java
 ##########
 @@ -166,21 +171,21 @@ public void testFileReadingOperatorWithIngestionTime() 
throws Exception {
                final long watermarkInterval = 10;
 
                ContinuousFileReaderOperator<String> reader = new 
ContinuousFileReaderOperator<>(format);
-               final 
OneInputStreamOperatorTestHarness<TimestampedFileInputSplit, String> tester =
-                       new OneInputStreamOperatorTestHarness<>(reader);
+               final 
OneInputStreamOperatorTestHarness<TimestampedFileInputSplit, String> tester = 
getTester(reader);
 
                
tester.getExecutionConfig().setAutoWatermarkInterval(watermarkInterval);
                tester.setTimeCharacteristic(TimeCharacteristic.IngestionTime);
                reader.setOutputType(typeInfo, tester.getExecutionConfig());
 
-               tester.open();
+               tester.getTaskMailbox().put(new Mail(tester::open, 0, ""));
 
                Assert.assertEquals(TimeCharacteristic.IngestionTime, 
tester.getTimeCharacteristic());
 
                // test that watermarks are correctly emitted
 
                ConcurrentLinkedQueue<Object> output = tester.getOutput();
 
+               Thread.sleep(1000);
 
 Review comment:
   Why do we need the sleep here? I'm worried that the test may not be stable 
(or is it now?). Would latches make it fully deterministic?

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