[ https://issues.apache.org/jira/browse/YARN-2921?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14233751#comment-14233751 ]
Karthik Kambatla commented on YARN-2921: ---------------------------------------- Using the latch would make sense if the threads have any other advantage; otherwise, I would leave both out and control time waited through number of iterations of the for loop. Fixing MockAM#waitFor here would be good too. We should make sure the cumulative wait time stays at least as long as what it is now to avoid any test failures. > MockRM#waitForState methods can be too slow and flaky > ----------------------------------------------------- > > Key: YARN-2921 > URL: https://issues.apache.org/jira/browse/YARN-2921 > Project: Hadoop YARN > Issue Type: Improvement > Components: test > Affects Versions: 2.6.0 > Reporter: Karthik Kambatla > Assignee: Tsuyoshi OZAWA > Attachments: YARN-2921.001.patch > > > MockRM#waitForState methods currently sleep for too long (2 seconds and 1 > second). This leads to slow tests and sometimes failures if the > App/AppAttempt moves to another state. -- This message was sent by Atlassian JIRA (v6.3.4#6332)