zhuzhurk commented on a change in pull request #10072: [FLINK-14536][core] Sum 
the cpuCores when merging resource specs
URL: https://github.com/apache/flink/pull/10072#discussion_r341846843
 
 

 ##########
 File path: 
flink-streaming-java/src/test/java/org/apache/flink/streaming/api/graph/StreamingJobGraphGeneratorTest.java
 ##########
 @@ -275,7 +275,7 @@ public void invoke(Tuple2<Integer, Integer> value) throws 
Exception {
                JobVertex sourceMapFilterVertex = 
jobGraph.getVerticesSortedTopologicallyFromSources().get(0);
                JobVertex reduceSinkVertex = 
jobGraph.getVerticesSortedTopologicallyFromSources().get(1);
 
-               
assertTrue(sourceMapFilterVertex.getMinResources().equals(resource1.merge(resource2).merge(resource3)));
+               
assertTrue(sourceMapFilterVertex.getMinResources().equals(resource3.merge(resource2).merge(resource1)));
 
 Review comment:
   This change is needed because the sum of double values differs with 
different merge orders.
   A better solution is to take double precision into consideration and avoid 
using `equals` to do comparison.
   More details see FLINK-14594.

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