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

Adam Antal commented on YARN-6272:
----------------------------------

Couldn't we force the container to be allocated in the same node using some 
locality rules? Because in that case when the NM is allocated elsewhere this 
test does not test anything.

Also in this case it makes sense to use MockRM and MockNM but it would require 
excessive modification around that testcase.

In your patch could you please add a safety check into 
{{doContainerResourceChange}} before asserting that the size of the updated 
containers is 1? Asserting that allocateAttempts < 1000 would be ideal.

> TestAMRMClient#testAMRMClientWithContainerResourceChange fails intermittently
> -----------------------------------------------------------------------------
>
>                 Key: YARN-6272
>                 URL: https://issues.apache.org/jira/browse/YARN-6272
>             Project: Hadoop YARN
>          Issue Type: Test
>          Components: yarn
>    Affects Versions: 3.0.0-alpha4
>            Reporter: Ray Chiang
>            Assignee: Prabhu Joseph
>            Priority: Major
>         Attachments: YARN-6272-001.patch
>
>
> I'm seeing this unit test fail fairly often in trunk:
> testAMRMClientWithContainerResourceChange(org.apache.hadoop.yarn.client.api.impl.TestAMRMClient)
>   Time elapsed: 5.113 sec  <<< FAILURE!
> java.lang.AssertionError: expected:<1> but was:<0>
>         at org.junit.Assert.fail(Assert.java:88)
>         at org.junit.Assert.failNotEquals(Assert.java:743)
>         at org.junit.Assert.assertEquals(Assert.java:118)
>         at org.junit.Assert.assertEquals(Assert.java:555)
>         at org.junit.Assert.assertEquals(Assert.java:542)
>         at 
> org.apache.hadoop.yarn.client.api.impl.TestAMRMClient.doContainerResourceChange(TestAMRMClient.java:1087)
>         at 
> org.apache.hadoop.yarn.client.api.impl.TestAMRMClient.testAMRMClientWithContainerResourceChange(TestAMRMClient.java:963)



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to