@Test
  public void testCompactFromAdmin() {
    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(() -> createReplicateRegionWithoutCompaction(regionName, getDiskDirs(getVMId())));
    }

    vm1.invoke(() -> {
      Region<Integer, byte[]> region = getCache().getRegion(regionName);
      for (int i = 0; i < 1024; i++) {
        region.put(i, new byte[1024]);
      }
      for (int i = 2; i < 1024; i++) {
        assertThat(region.destroy(i)).isNotNull();
      }
      DiskStore diskStore = getCache().findDiskStore(regionName);
      diskStore.forceRoll();
    });

    vm2.invoke(() -> {
      // GemFire:service=DiskStore,name={0},type=Member,member={1}
      ObjectName pattern = new ObjectName("GemFire:service=DiskStore,*");

      await().untilAsserted(() -> {
        Set<ObjectName> mbeanNames = getPlatformMBeanServer().queryNames(pattern, null);

        assertThat(mbeanNames).hasSize(2);
      });

      Set<ObjectName> mbeanNames = getPlatformMBeanServer().queryNames(pattern, null);
      for (ObjectName objectName : mbeanNames) {
        DiskStoreMXBean diskStoreMXBean =
            newProxyInstance(getPlatformMBeanServer(), objectName, DiskStoreMXBean.class, false);
        assertThat(diskStoreMXBean.forceCompaction()).isTrue();
      }
    });

    for (VM vm : toArray(vm0, vm1)) {
      vm.invoke(() -> {
        DiskStore diskStore = getCache().findDiskStore(regionName);
        assertThat(diskStore.forceCompaction()).isFalse();
      });
    }
  }
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