You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/07/23 15:30:38 UTC

[GitHub] [flink] tillrohrmann commented on a change in pull request #9105: [FLINK-13241][Yarn/Mesos] Fix Yarn/MesosResourceManager setting managed memory size into wrong configuration instance.

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

 ##########
 File path: flink-runtime/src/test/java/org/apache/flink/runtime/resourcemanager/ResourceManagerTest.java
 ##########
 @@ -270,4 +282,49 @@ private TestingResourceManager createAndStartResourceManager(HeartbeatServices h
 
 		return resourceManager;
 	}
+
+	/**
+	 * Tests that RM and TM calculate same slot resource profile.
+	 */
+	@Test
+	public void testCreateSlotsPerWorker() throws Exception {
+		testCreateSlotsPerWorker(new Configuration());
+
+		Configuration config1 = new Configuration();
+		config1.setInteger(TaskManagerOptions.NUM_TASK_SLOTS, 5);
+		testCreateSlotsPerWorker(config1);
+
+		Configuration config2 = new Configuration();
+		config2.setString(TaskManagerOptions.MANAGED_MEMORY_SIZE, "789m");
+		testCreateSlotsPerWorker(config2);
+
+		Configuration config3 = new Configuration();
+		config3.setString(TaskManagerOptions.MANAGED_MEMORY_SIZE, "300m");
+		config3.setBoolean(TaskManagerOptions.MEMORY_OFF_HEAP, true);
+		testCreateSlotsPerWorker(config3);
+
+		Configuration config4 = new Configuration();
+		config4.setString(NettyShuffleEnvironmentOptions.NETWORK_BUFFERS_MEMORY_MAX, "10m");
+		config4.setString(NettyShuffleEnvironmentOptions.NETWORK_BUFFERS_MEMORY_MIN, "10m");
+		config4.setBoolean(TaskManagerOptions.MEMORY_OFF_HEAP, true);
+		testCreateSlotsPerWorker(config4);
 
 Review comment:
   Please split this test case up into individual tests. A single test for a single thing to test with a meaningful test name.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services