Github user pnowojski commented on a diff in the pull request:
https://github.com/apache/flink/pull/6091#discussion_r191760364
--- Diff:
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/operators/async/AsyncWaitOperatorTest.java
---
@@ -212,6 +212,20 @@ public static void countDown() {
}
}
+ private static class TimeoutAwareLazyAsyncFunction extends
LazyAsyncFunction {
+ private static final long serialVersionUID =
1428714561365346128L;
+
+ @Override
+ public void timeout(Integer input, ResultFuture<Integer>
resultFuture) throws Exception {
+ if (input != null && input % 2 == 0) {
+
resultFuture.complete(Collections.singletonList(input * 3));
+ } else {
+ // ignore odd input number when it timeouts
--- End diff --
Move this comment to the top of this static class?
---