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 2018/11/02 10:33:44 UTC

[GitHub] dawidwys closed pull request #6990: [FLINK-10581][yarn] Increased the threshold for memory verification in YarnConfigurationITCase.testFlinkContainerMemory

dawidwys closed pull request #6990: [FLINK-10581][yarn] Increased the threshold for memory verification in YarnConfigurationITCase.testFlinkContainerMemory
URL: https://github.com/apache/flink/pull/6990
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YarnConfigurationITCase.java b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YarnConfigurationITCase.java
index 58710bc6962..571681aba82 100644
--- a/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YarnConfigurationITCase.java
+++ b/flink-yarn-tests/src/test/java/org/apache/flink/yarn/YarnConfigurationITCase.java
@@ -179,7 +179,12 @@ public void testFlinkContainerMemory() throws Exception {
 
 				final long expectedHeadSize = containeredTaskManagerParameters.taskManagerHeapSizeMB() << 20L;
 
-				assertThat((double) taskManagerInfo.getHardwareDescription().getSizeOfJvmHeap() / (double) expectedHeadSize, is(closeTo(1.0, 0.1)));
+				// We compare here physical memory assigned to a container with the heap memory that we should pass to
+				// jvm as Xmx parameter. Those value might differ significantly due to sytem page size or jvm
+				// implementation therefore we use 15% threshold here.
+				assertThat(
+					(double) taskManagerInfo.getHardwareDescription().getSizeOfJvmHeap() / (double) expectedHeadSize,
+					is(closeTo(1.0, 0.15)));
 			} finally {
 				restClient.shutdown(TIMEOUT);
 				clusterClient.shutdown();


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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