@VisibleForTesting
  // this method is only used for testing. Should be extract to a test helper instead
  public static void crashDistributedSystem(final DistributedSystem msys) {
    msys.getLogWriter().info("crashing distributed system: " + msys);
    Distribution mgr = getDistribution(msys);
    MembershipManagerHelper.inhibitForcedDisconnectLogging(true);
    MembershipManagerHelper.beSickMember(msys);
    MembershipManagerHelper.playDead(msys);
    ((GMSMembership) mgr.getMembership()).getGMSManager().forceDisconnect("for testing");
    // wait at most 10 seconds for system to be disconnected
    await().until(() -> !msys.isConnected());
    MembershipManagerHelper.inhibitForcedDisconnectLogging(false);
  }
wait for a member to leave the view. Throws an assertionerror if the timeout period elapses
before the member leaves
geode-dunit/src/main/java/org/apache/geode/distributed/internal/membership/api/MembershipManagerHelper.java