Github user pnowojski commented on a diff in the pull request:
https://github.com/apache/flink/pull/6081#discussion_r195012204
--- Diff:
flink-streaming-java/src/test/java/org/apache/flink/streaming/runtime/tasks/StreamTaskTest.java
---
@@ -1239,6 +1286,50 @@ protected void cancelTask() throws Exception {
}
+ /**
+ * A task that register a processing time service callback.
+ */
+ public static class TimeServiceTask extends StreamTask<String,
AbstractStreamOperator<String>> {
+
+ public TimeServiceTask(Environment env) {
+ super(env, null);
+ }
+
+ @Override
+ protected void init() throws Exception {
+ getProcessingTimeService().registerTimer(1000, new
ProcessingTimeCallback() {
--- End diff --
Please change `1000` to `0`. This parameter is not a delay in
miliseconds/seconds from now, but specifies exact timestamp when the timer
should fire, thus value `1000` is misleading.
---