tillrohrmann commented on a change in pull request #10427: [FLINK-14566] Enable 
to get/set whether an operator uses managed memory
URL: https://github.com/apache/flink/pull/10427#discussion_r354336068
 
 

 ##########
 File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/graph/StreamGraphGeneratorTest.java
 ##########
 @@ -460,13 +461,19 @@ public void testIteration() {
                DataStream<Integer> filter = map.filter((x) -> 
false).name("filter").setParallelism(2);
                iteration.closeWith(filter).print();
 
+               final ResourceSpec resources = ResourceSpec.newBuilder(1.0, 
100).build();
+               iteration.getTransformation().setResources(resources, 
resources);
+
                StreamGraph streamGraph = env.getStreamGraph();
                for (Tuple2<StreamNode, StreamNode> iterationPair : 
streamGraph.getIterationSourceSinkPairs()) {
                        assertNotNull(iterationPair.f0.getCoLocationGroup());
                        assertEquals(iterationPair.f0.getCoLocationGroup(), 
iterationPair.f1.getCoLocationGroup());
 
                        
assertEquals(StreamGraphGenerator.DEFAULT_SLOT_SHARING_GROUP, 
iterationPair.f0.getSlotSharingGroup());
                        assertEquals(iterationPair.f0.getSlotSharingGroup(), 
iterationPair.f1.getSlotSharingGroup());
+
+                       assertEquals(resources, 
iterationPair.f0.getMinResources());
+                       assertEquals(ResourceSpec.ZERO, 
iterationPair.f1.getMinResources());
 
 Review comment:
   Here we are testing for implementation details. Wouldn't it be better to 
test that the sum of the source and sink resources equals `resources`?

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


With regards,
Apache Git Services

Reply via email to