Myasuka 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_r403207707
########## 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: There existed another problem why we not change the constructor of `StreamTaskStateInitializerImpl`. Current `AbstractStreamOperatorTestHarness` is not created from a builder, and once a new `AbstractStreamOperatorTestHarness` is created, the inner `streamTaskStateInitializer` has been created with the default `TtlTimeProvider`. Even we set ttl time provider to `AbstractStreamOperatorTestHarness` later, the inner `streamTaskStateInitializer` would not notice the changed ttl time provider unless we call `AbstractStreamOperatorTestHarness#setup` to re-create the inner `streamTaskStateInitializer`. However, `AbstractStreamOperatorTestHarness#setup` actually call a deprecated `SetupableStreamOperator#setup` interface. In a nutshell, unless we refactor how we build `AbstractStreamOperatorTestHarness`, to make the customized ttl time provider take effect, we must call `AbstractStreamOperatorTestHarness#setup` each time which might already be treated as a deprecated interface. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services