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/01 16:22:11 UTC

[GitHub] [flink] rkhachatryan commented on a change in pull request #11515: [FLINK-16744][task] implement channel state persistence for unaligned checkpoints

rkhachatryan commented on a change in pull request #11515: [FLINK-16744][task] implement channel state persistence for unaligned checkpoints
URL: https://github.com/apache/flink/pull/11515#discussion_r401743359
 
 

 ##########
 File path: flink-table/flink-table-runtime-blink/src/test/java/org/apache/flink/table/runtime/operators/over/BufferDataOverWindowOperatorTest.java
 ##########
 @@ -205,9 +206,19 @@ public StreamConfig getOperatorConfig() {
 
 			@Override
 			public StreamTask<?, ?> getContainingTask() {
-				StreamTask task = mock(StreamTask.class);
+				class MockableStreamTask extends StreamTask<Object, StreamOperator<Object>> implements EnvironmentSupport {
+					MockableStreamTask() throws Exception {
+						super(new MockEnvironmentBuilder().build());
+					}
+
+					@Override
+					protected void init() {
+					}
+				}
+
+				StreamTask<?, ?> task = mock(MockableStreamTask.class);
 				Environment env = mock(Environment.class);
-				when(task.getEnvironment()).thenReturn(env);
+				when(task.getEnvironment()).thenReturn(new MockEnvironmentBuilder().build());
 
 Review comment:
   because task is still a mock and `getEnvironment()` is called on it.

----------------------------------------------------------------
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