You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Bruce Schuchardt (JIRA)" <ji...@apache.org> on 2019/08/06 20:44:00 UTC

[jira] [Resolved] (GEODE-6747) CI failure: GMSJoinLeaveJUnitTest fails intermittently, possibly due to incorrect use of Mockito spy from multiple threads

     [ https://issues.apache.org/jira/browse/GEODE-6747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Bruce Schuchardt resolved GEODE-6747.
-------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.11.0

> CI failure: GMSJoinLeaveJUnitTest fails intermittently, possibly due to incorrect use of Mockito spy from multiple threads
> --------------------------------------------------------------------------------------------------------------------------
>
>                 Key: GEODE-6747
>                 URL: https://issues.apache.org/jira/browse/GEODE-6747
>             Project: Geode
>          Issue Type: Bug
>          Components: membership
>            Reporter: Bill Burcham
>            Priority: Major
>             Fix For: 1.11.0
>
>
> {noformat}
> org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeaveJUnitTest > testRemoveMessageForRogueCausesImmediateRemovalMessageToRogue FAILED
>     org.mockito.exceptions.misusing.WrongTypeOfReturnValue: 
>     Messenger$MockitoMock$1405677960 cannot be returned by getCancelCriterion()
>     getCancelCriterion() should return Stopper
>     ***
>     If you're unsure why you're getting above error read on.
>     Due to the nature of the syntax above problem might occur because:
>     1. This exception *might* occur in wrongly written multi-threaded tests.
>        Please refer to Mockito FAQ on limitations of concurrency testing.
>     2. A spy is stubbed using when(spy.foo()).then() syntax. It is safer to stub spies - 
>        - with doReturn|Throw() family of methods. More in javadocs for Mockito.spy() method.
>         at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeaveJUnitTest.prepareAndInstallView(GMSJoinLeaveJUnitTest.java:347)
>         at org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeaveJUnitTest.testRemoveMessageForRogueCausesImmediateRemovalMessageToRogue(GMSJoinLeaveJUnitTest.java:599)
> {noformat}
> ^ lookie right there. I wonder if our test is accessing Mockito spy functionality (incorrectly) from multiple threads?!?
> Concourse build: [https://concourse.apachegeode-ci.info/teams/main/pipelines/apache-develop-main/jobs/IntegrationTestOpenJDK11/builds/691]
> …on this commit: ddef7b7418fb21526b144f91cd4896a016a05e3c
> Previous build, on this commit, passed: d315756f958e91875bbe79179de1ed37141502b6
> Next build, on this commit, passed: a716be9262a928871c0cd61480ed3ac5051ad429
> So it's obvious that this is a brand new bug.
> I ran the test about 25 times in IntelliJ with no failures. So it appears to be intermittent.
>  
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.14#76016)