[ https://issues.apache.org/jira/browse/GEODE-2653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15973702#comment-15973702 ]
ASF subversion and git services commented on GEODE-2653: -------------------------------------------------------- Commit c5ee7cd4338a91ab40ee355612057b05b299b6d6 in geode's branch refs/heads/develop from [~gosullivan] [ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=c5ee7cd ] GEODE-2653: Fix testRemoveMember and remove FlakyTest. This closes #437 Test removed self instead of the other member, and used the `any` matcher instead of `isA`. Cleanup GMSJoinLeaveJUnitTest. * Change Mockito's `any` to `isA`. * Replace some `Thread.sleep()` calls with Awaitility calls. * Remove our `MethodExecuted` class -- this can be done with Mockito's `verify()`. Remove a redundant assert. > GMSJoinLeaveJUnitTest.testRemoveMember fails with AssertionError > ---------------------------------------------------------------- > > Key: GEODE-2653 > URL: https://issues.apache.org/jira/browse/GEODE-2653 > Project: Geode > Issue Type: Bug > Components: membership, tests > Reporter: Kirk Lund > Assignee: Galen O'Sullivan > Labels: Flaky > > Intermittent failure stack: > {noformat} > org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeaveJUnitTest > > testRemoveMember FAILED > java.lang.AssertionError > at org.junit.Assert.fail(Assert.java:86) > at org.junit.Assert.assertTrue(Assert.java:41) > at org.junit.Assert.assertTrue(Assert.java:52) > at > org.apache.geode.distributed.internal.membership.gms.membership.GMSJoinLeaveJUnitTest.testRemoveMember(GMSJoinLeaveJUnitTest.java:337) > {noformat} > This test looks like it's flaky due to the Thread sleep: > {noformat} > @Test > public void testRemoveMember() throws Exception { > initMocks(); > prepareAndInstallView(mockMembers[0], createMemberList(mockMembers[0], > gmsJoinLeaveMemberId)); > MethodExecuted removeMessageSent = new MethodExecuted(); > > when(messenger.send(any(RemoveMemberMessage.class))).thenAnswer(removeMessageSent); > gmsJoinLeave.remove(mockMembers[0], "removing for test"); > Thread.sleep(ServiceConfig.MEMBER_REQUEST_COLLECTION_INTERVAL * 2); > assertTrue(removeMessageSent.methodExecuted); > } > {noformat} -- This message was sent by Atlassian JIRA (v6.3.15#6346)