@Test
  public void testFinalCheckInProgressPreemptsLivenessGossip() throws Exception {
    // if a member is undergoing a final check we should not accept another member's
    // gossip about the suspect being alive and should not update the contact timestamp
    // because that interferes with the final check
    useGMSHealthMonitorTestClass = true;
    simulateHeartbeatInGMSHealthMonitorTestClass = false;

    GMSMembershipView v = installAView();
    setFailureDetectionPorts(v);

    MemberIdentifier memberToCheck = gmsHealthMonitor.getNextNeighbor();
    GMSHealthMonitorTest testMonitor = (GMSHealthMonitorTest) gmsHealthMonitor;

    // set an old contact timestamp for the suspect, tell the monitor that an availability
    // check succeeded and then make sure it didn't update the timestamp for the suspect
    final long timestamp = testMonitor.establishCurrentTime() - 2000;
    testMonitor.setContactTimestamp(memberToCheck, timestamp);
    testMonitor.addMemberInFinalCheck(memberToCheck);
    testMonitor.processMessage(new FinalCheckPassedMessage(null, memberToCheck));
    assertThat(testMonitor.getContactTimestamp(memberToCheck)).isEqualTo(timestamp);
  }
Send remove member message after doing final check for coordinator, ping timeout This test
trying to remove coordinator
geode-membership/src/integrationTest/java/org/apache/geode/distributed/internal/membership/gms/fd/GMSHealthMonitorJUnitTest.java