public static void waitForMemberDeparture(final DistributedSystem sys,
      final InternalDistributedMember member, final long timeout) {
    WaitCriterion ev = new WaitCriterion() {
      @Override
      public boolean done() {
        return !getDistribution(sys).getView().contains(member);
      }

      @Override
      public String description() {
        return "Waited over " + timeout + " ms for " + member + " to depart, but it didn't";
      }
    };
    GeodeAwaitility.await().untilAsserted(ev);
  }
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