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

 ##########
 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:
   That's right. Testing the merged resources would be better since the way to 
split the resources should make no difference at the moment and we actually do 
not care about 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:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to