@Test
  public void testRevokeAMember() throws Exception {
    vm2.invoke(() -> {
      Properties props = getDistributedSystemProperties();
      props.setProperty(JMX_MANAGER, "true");
      props.setProperty(JMX_MANAGER_PORT, valueOf(jmxManagerPort));
      props.setProperty(JMX_MANAGER_START, "true");
      props.setProperty(HTTP_SERVICE_PORT, "0");
      getCache(props);
    });

    for (VM vm : toArray(vm0, vm1)) {
      vm.invoke(() -> createReplicateRegion(regionName, getDiskDirs(getVMId())));
    }

    vm0.invoke(() -> {
      putEntry("A", "B");

      PersistentMemberManager manager = getCache().getPersistentMemberManager();
      Map<String, Set<PersistentMemberID>> waitingRegions = manager.getWaitingRegions();
      assertThat(waitingRegions).isEmpty();

      getCache().getRegion(regionName).close();
    });

    vm1.invoke(() -> {
      updateEntry("A", "C");
      getCache().close();
    });

    // This ought to wait for VM1 to come back
    AsyncInvocation<Void> createPersistentRegionInVM0 = vm0.invokeAsync(() -> {
      createReplicateRegion(regionName, getDiskDirs(getVMId()));
    });
    vm0.invoke(this::waitForBlockedInitialization);
    assertThat(createPersistentRegionInVM0.isAlive()).isTrue();

    vm2.invoke(() -> {
      ManagementService managementService = ManagementService.getManagementService(getCache());

      await().untilAsserted(() -> {
        assertThat(managementService.getDistributedSystemMXBean()).isNotNull();
      });

      DistributedSystemMXBean dsMXBean = managementService.getDistributedSystemMXBean();

      await().until(() -> dsMXBean.listMissingDiskStores().length > 0);

      PersistentMemberDetails[] persistentMemberDetails = dsMXBean.listMissingDiskStores();
      assertThat(persistentMemberDetails).hasSize(1);

      String missingDiskStoreId = persistentMemberDetails[0].getDiskStoreId();
      boolean revoked = dsMXBean.revokeMissingDiskStores(missingDiskStoreId);
      assertThat(revoked).isTrue();
    });

    createPersistentRegionInVM0.await();

    vm0.invoke(() -> {
      validateDiskRegionInitializationStats(true);

      // Check to make sure we recovered the old value of the entry.
      Region<String, String> region = getCache().getRegion(regionName);
      assertThat(region.get("A")).isEqualTo("B");
    });

    // Now, we should not be able to create a region in vm1, because the this member was revoked
    vm1.invoke(() -> {
      try (IgnoredException ie = addIgnoredException(RevokedPersistentDataException.class)) {
        Throwable thrown = catchThrowable(() -> {
          createReplicateRegion(regionName, getDiskDirs(getVMId()));
        });
        assertThat(thrown).isInstanceOf(RevokedPersistentDataException.class);
      }
    });

    vm1.invoke(() -> getCache().close());

    // Restart vm0
    vm0.invoke(() -> {
      getCache().close();
      createReplicateRegion(regionName, getDiskDirs(getVMId()));
    });
  }
Tests to make sure that we stop waiting for a member that we revoke.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/persistence/PersistentRecoveryOrderDUnitTest.java