flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pnowojski <...@git.apache.org>
Subject [GitHub] flink pull request #5239: [FLINK-8360] Implement task-local state recovery
Date Mon, 08 Jan 2018 12:52:43 GMT
Github user pnowojski commented on a diff in the pull request:

    --- Diff: flink-contrib/flink-storm/src/test/java/org/apache/flink/storm/wrappers/BoltWrapperTest.java
    @@ -375,11 +376,13 @@ public void declareOutputFields(OutputFieldsDeclarer declarer) {
     		when(env.getMetricGroup()).thenReturn(new UnregisteredTaskMetricsGroup());
     		when(env.getTaskManagerInfo()).thenReturn(new TestingTaskManagerRuntimeInfo());
    +		final CloseableRegistry closeableRegistry = new CloseableRegistry();
     		StreamTask<?, ?> mockTask = mock(StreamTask.class);
     		when(mockTask.getCheckpointLock()).thenReturn(new Object());
     		when(mockTask.getConfiguration()).thenReturn(new StreamConfig(new Configuration()));
    +		when(mockTask.getCancelables()).thenReturn(closeableRegistry);
    --- End diff --
    I don't like the idea of postponing such things. I really would like it to be done in
this pr (as a separate commit, ideally at the bottom to avoid modifying same lines of code
twice, but as a last resort it could also be the last commit). Otherwise we will forget about
it and while this only one added line it increases our technological debt and makes our code
base a tiny bit worse then it used to be before - both of those things are quite dangerous.


View raw message