xintongsong commented on a change in pull request #9105: 
[FLINK-13241][Yarn/Mesos] Fix Yarn/MesosResourceManager setting managed memory 
size into wrong configuration instance.
URL: https://github.com/apache/flink/pull/9105#discussion_r304786802
 
 

 ##########
 File path: 
flink-yarn-tests/src/test/java/org/apache/flink/yarn/YarnConfigurationITCase.java
 ##########
 @@ -187,6 +191,12 @@ public void testFlinkContainerMemory() throws Exception {
                                        assertThat(
                                                (double) 
taskManagerInfo.getHardwareDescription().getSizeOfJvmHeap() / (double) 
expectedHeadSize,
                                                is(closeTo(1.0, 0.15)));
+
+                                       final int defaultTaskManagerMemoryMB = 
ConfigurationUtils.getTaskManagerHeapMemory(configuration).getMebiBytes();
 
 Review comment:
   I tend to disagree. I don't think it is necessary for this test case to have 
any assumption on how `updateTaskManagerConfigAndCreateWorkerSlotProfiles` 
calculates managed memory. The purpose of this test case, to my understanding, 
is to validate that configurations are well passed to TMs rather than the 
calculation logics. The latter is already covered by another test case. If it 
does happen that the real calculation changes in a way that 
`updateTaskManagerConfigAndCreateWorkerSlotProfiles` is not used any more, then 
this test case should also fail as long as the calculation on TM side changes 
consistently, or otherwise the other test case `testCreateSlotsPerWorker` 
should fail.

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