flink-instrumentation/workspace/flink-1.4.1-instrumented/flink-1.4.1/flink-runtime/src/test/java/org/apache/flink/runtime/clusterframework/ContaineredTaskManagerParametersTest.java
/**
	 * This tests that when using off heap memory the sum of on and off heap memory does not exceeds the container
	 * maximum.
	 */
This tests that when using off heap memory the sum of on and off heap memory does not exceeds the container
maximum.
This tests that when using off heap memory the sum of on and off heap memory does not exceeds the container maximum .
@Test
	public void testTotalMemoryDoesNotExceedContainerMemory() {
		Configuration conf = new Configuration();
		conf.setBoolean(MEMORY_OFF_HEAP, true);
		ContaineredTaskManagerParameters params =
			ContaineredTaskManagerParameters.create(conf, CONTAINER_MEMORY, 1);
		assertTrue(params.taskManagerDirectMemoryLimitMB() > 0L);
		assertTrue(params.taskManagerHeapSizeMB() +
			params.taskManagerDirectMemoryLimitMB() <= CONTAINER_MEMORY);
	}
@ Test public void testTotalMemoryDoesNotExceedContainerMemory ( ) { Configuration conf = new Configuration ( ) ; conf . setBoolean ( MEMORY_OFF_HEAP , true ) ; ContaineredTaskManagerParameters params = ContaineredTaskManagerParameters . create ( conf , CONTAINER_MEMORY , 1 ) ; assertTrue ( params . taskManagerDirectMemoryLimitMB ( ) > 0L ) ; assertTrue ( params . taskManagerHeapSizeMB ( ) + params . taskManagerDirectMemoryLimitMB ( ) <= CONTAINER_MEMORY ) ; }
This tests that when using off heap memory the sum of on and off heap memory does not exceeds the container
 maximum.
This tests that when using off heap memory the sum of on and off heap memory does not exceeds the container maximum .