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

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

Kirk Lund created GEODE-2653:
--------------------------------

             Summary: 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


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)