You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@geode.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2017/03/13 22:40:41 UTC

[jira] [Commented] (GEODE-2653) GMSJoinLeaveJUnitTest.testRemoveMember fails with AssertionError

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

ASF subversion and git services commented on GEODE-2653:
--------------------------------------------------------

Commit f4701a1f97df18b394bbf3f3fcd8c23156d95510 in geode's branch refs/heads/develop from [~apache@the9muses.net]
[ https://git-wip-us.apache.org/repos/asf?p=geode.git;h=f4701a1 ]

GEODE-2653: Add FlakyTest category to test with Thread.sleep


> 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
>              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)