gaoyunhaii commented on a change in pull request #8704: [FLINK-12812][runtime] Set resource profiles for task slots URL: https://github.com/apache/flink/pull/8704#discussion_r294159877
########## File path: flink-runtime/src/test/java/org/apache/flink/runtime/taskexecutor/TaskExecutorTest.java ########## @@ -1744,6 +1757,39 @@ public void testSyncSlotsWithJobMasterByHeartbeat() throws Exception { } } + @Test + public void testSlotReportResourceProfile() throws Throwable { + Configuration config = new Configuration(); + config.setInteger(TaskManagerOptions.NUM_TASK_SLOTS, 2); + config.setString(NettyShuffleEnvironmentOptions.NETWORK_BUFFERS_MEMORY_MIN, "100m"); Review comment: I think it may be better to define the test data in variables, and get the target value in the following `assertEquals` with the relationship between the variables, like <pre> int networkMemoryInMB = 100; .... assertEquals(networkMemoryInMB / numSlots, resourceProfile.getNetworkMemoryInMB()); </pre> ---------------------------------------------------------------- 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