pnowojski 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_r376294978
##########
File path:
flink-fs-tests/src/test/java/org/apache/flink/hdfstests/ContinuousFileProcessingTest.java
##########
@@ -313,17 +313,11 @@ public int compare(String o1, String o2) {
}
private OneInputStreamOperatorTestHarness<TimestampedFileInputSplit,
String> getTester(ContinuousFileReaderOperator<String> reader) throws Exception
{
-
CompletableFuture<OneInputStreamOperatorTestHarness<TimestampedFileInputSplit,
String>> future = new CompletableFuture<>();
- new Thread(() -> {
- try
(OneInputStreamOperatorTestHarness<TimestampedFileInputSplit, String> harness =
new OneInputStreamOperatorTestHarness<>(reader)) {
- future.complete(harness);
- new
MailboxProcessor(MailboxDefaultAction.Controller::suspendDefaultAction,
harness.getTaskMailbox(), StreamTaskActionExecutor.IMMEDIATE)
- .runMailboxLoop();
- } catch (Exception e) {
- future.completeExceptionally(e);
- }
- }).start();
- return future.get();
+ return new OneInputStreamOperatorTestHarness<>(reader);
Review comment:
optional nit: inline?
----------------------------------------------------------------
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