You are viewing a plain text version of this content. The canonical link for it is here.
Posted to yarn-issues@hadoop.apache.org by "Robert Kanter (JIRA)" <ji...@apache.org> on 2018/03/19 22:52:00 UTC

[jira] [Commented] (YARN-8051) TestRMEmbeddedElector#testCallbackSynchronization is flakey

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

Robert Kanter commented on YARN-8051:
-------------------------------------

The problem is a timing issue: we're using a short {{Thread.sleep}} in the test (and some related ones). The patch fixes this by replacing the {{Thread.sleep}} calls with {{GenericTestUtils.waitFor}} calls. In order to get the actual count of the numbers of calls to do this, I had to update Mockito so I could use {{mockingDetails}}. I also replaced some silly pairs of {{verify}} statements where we had {{atLeast(1)}} and {{atMost(1)}}, with just {{times(1)}}.

> TestRMEmbeddedElector#testCallbackSynchronization is flakey
> -----------------------------------------------------------
>
>                 Key: YARN-8051
>                 URL: https://issues.apache.org/jira/browse/YARN-8051
>             Project: Hadoop YARN
>          Issue Type: Improvement
>          Components: test
>    Affects Versions: 3.2.0
>            Reporter: Robert Kanter
>            Assignee: Robert Kanter
>            Priority: Major
>         Attachments: YARN-8051.001.patch
>
>
> We've seen some rare flakey failures in {{TestRMEmbeddedElector#testCallbackSynchronization}}:
> {noformat}
> org.mockito.exceptions.verification.WantedButNotInvoked: 
> Wanted but not invoked:
> adminService.transitionToStandby(<any>);
> -> at org.apache.hadoop.yarn.server.resourcemanager.TestRMEmbeddedElector.testCallbackSynchronizationNeutral(TestRMEmbeddedElector.java:215)
> Actually, there were zero interactions with this mock.
> 	at org.apache.hadoop.yarn.server.resourcemanager.TestRMEmbeddedElector.testCallbackSynchronizationNeutral(TestRMEmbeddedElector.java:215)
> 	at org.apache.hadoop.yarn.server.resourcemanager.TestRMEmbeddedElector.testCallbackSynchronization(TestRMEmbeddedElector.java:146)
> 	at org.apache.hadoop.yarn.server.resourcemanager.TestRMEmbeddedElector.testCallbackSynchronization(TestRMEmbeddedElector.java:109)
> {noformat}



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

---------------------------------------------------------------------
To unsubscribe, e-mail: yarn-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: yarn-issues-help@hadoop.apache.org