You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2020/04/10 07:02:15 UTC
[GitHub] [flink] wuchong commented on a change in pull request #11624:
[FLINK-16949] Enhance AbstractStreamOperatorTestHarness to use customized
TtlTimeProvider
wuchong commented on a change in pull request #11624: [FLINK-16949] Enhance AbstractStreamOperatorTestHarness to use customized TtlTimeProvider
URL: https://github.com/apache/flink/pull/11624#discussion_r406631428
##########
File path: flink-streaming-java/src/main/java/org/apache/flink/streaming/api/operators/StreamTaskStateInitializerImpl.java
##########
@@ -258,6 +258,10 @@ protected OperatorStateBackend operatorStateBackend(
}
}
+ protected TtlTimeProvider getTtlTimeProvider() {
Review comment:
Why not `AbstractStreamOperatorTestHarness` always use a mocked `TtlTimeProvider`? Just like always use the `TestProcessingTimeService`. Then we don't need to re-create the inner `streamTaskStateInitializer`.
I also prefer the way to set processing time on the harness object `AbstractStreamOperatorTestHarness#setProcessingTime` instead of on other object `mockTtlTimeProvider.setCurrentTimeStamp(0L)`. We can provide a method `setStateTtlTime()` on the `AbstractStreamOperatorTestHarness` too.
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services