rmetzger commented on a change in pull request #14910:
URL: https://github.com/apache/flink/pull/14910#discussion_r576570468



##########
File path: 
flink-runtime/src/test/java/org/apache/flink/runtime/scheduler/declarative/MockExecutionGraph.java
##########
@@ -69,15 +73,22 @@ public MockExecutionGraph() throws IOException {
                 1,
                 ExecutionGraph.class.getClassLoader(),
                 VoidBlobWriter.getInstance(),
-                
PartitionReleaseStrategyFactoryLoader.loadPartitionReleaseStrategyFactory(
-                        new Configuration()),
+                getPartitionReleaseStrategyFactoryLoader(),
                 NettyShuffleMaster.INSTANCE,
                 NoOpJobMasterPartitionTracker.INSTANCE,
                 ScheduleMode.EAGER,
                 NoOpExecutionDeploymentListener.get(),
                 (execution, newState) -> {},
                 0L);
         this.setJsonPlan(""); // field must not be null for 
ArchivedExecutionGraph creation
+        this.attachJobGraph(Collections.emptyList()); // method must be called 
to initialize
+        // PartitionReleaseStrategy.
+    }
+
+    private static PartitionReleaseStrategy.Factory 
getPartitionReleaseStrategyFactoryLoader() {
+        Configuration conf = new Configuration();
+        conf.set(PARTITION_RELEASE_DURING_JOB_EXECUTION, false);
+        return 
PartitionReleaseStrategyFactoryLoader.loadPartitionReleaseStrategyFactory(conf);

Review comment:
       Yes, I agree. This is very fragile and annoying to maintain.




----------------------------------------------------------------
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:
[email protected]


Reply via email to