[ 
https://issues.apache.org/jira/browse/FLINK-10581?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16670308#comment-16670308
 ] 

Dawid Wysakowicz commented on FLINK-10581:
------------------------------------------

I do suspect it is because of how {{Runtime.getRuntime().maxMemory()}} is 
calculated, cause effectively we compare this value retrieved in 
{{TaskExecutor}} container with what we assume should be set as {{-Xmx}} while 
starting this container.
Thanks to this answer: 
https://stackoverflow.com/questions/23701207/why-do-xmx-and-runtime-maxmemory-not-agree
 depending on the jvm implementation it might happen that {{maxMemory}} will 
return value decreased by the size of one Survivor space. Final values for each 
space are also aligned with page sizes, which makes the whole calculation even 
harder.

Usually the value of 10% difference is enough but as it turned out not always. 
I would suggest to just increase the error threshold to e.g. 15%. Any other 
suggestions [~pnowojski] [~till.rohrmann]?

> YarnConfigurationITCase.testFlinkContainerMemory test instability
> -----------------------------------------------------------------
>
>                 Key: FLINK-10581
>                 URL: https://issues.apache.org/jira/browse/FLINK-10581
>             Project: Flink
>          Issue Type: Bug
>          Components: YARN
>    Affects Versions: 1.7.0
>            Reporter: Piotr Nowojski
>            Assignee: Dawid Wysakowicz
>            Priority: Critical
>              Labels: test-stability
>
> Test appeared to fail (by a narrow margin) without a reason randomly:
> {noformat}
> Failed tests: 
>   YarnConfigurationITCase.testFlinkContainerMemory:182 
> Expected: is a numeric value within <0.1> of <1.0>
>      but: <0.8913043478260869> differed by <0.008695652173913077>
> {noformat}
> https://api.travis-ci.org/v3/job/442246057/log.txt



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to