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

Haibo Chen commented on YARN-8051:
----------------------------------

Thanks [~rkanter] for the patch. HADOOP-12427 is dedicated to the mockito 
upgrade. There seems to be some incompatibility issues indicated there in the 
discussion?

If there is indeed some issues with upgrade mockito, we can fix the unit test 
without mockito upgrade.   Instead of mocking AdminService, we can create a 
subclass of AdminService in the test that tracks and exposes how many times the 
transitionTo* methods are called.

> 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: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to