@Test
  public void testAckSevereAlertThreshold() {
    // in order to set a small ack-wait-threshold, we have to remove the
    // system property established by the dunit harness
    System.clearProperty(GEMFIRE_PREFIX + ACK_WAIT_THRESHOLD);
    Properties config = getDistributedSystemProperties();
    config.setProperty(MCAST_PORT, "0");
    config.setProperty(ACK_WAIT_THRESHOLD, "3");
    config.setProperty(ACK_SEVERE_ALERT_THRESHOLD, "3");
    config.setProperty(NAME, "putter");
    getCache(config);

    RegionFactory<String, String> regionFactory = getCache().createRegionFactory();
    regionFactory.setScope(Scope.DISTRIBUTED_ACK);
    regionFactory.setDataPolicy(DataPolicy.REPLICATE);
    assertThat(getCache().isClosed()).isFalse();
    Region<String, String> region = regionFactory.create("testRegion");

    addIgnoredException("elapsed while waiting for replies");
    // Ignore logging from Connection.doSevereAlertProcessing()
    addIgnoredException("seconds have elapsed waiting for a response from");
    vm1.invoke("Connect to distributed system", () -> {
      config.setProperty(NAME, "sleeper");
      getSystem(config);

      RegionFactory<String, String> regionFactory2 = getCache().createRegionFactory();
      regionFactory2.setScope(Scope.DISTRIBUTED_ACK);
      regionFactory2.setDataPolicy(DataPolicy.REPLICATE);
      regionFactory2.addCacheListener(getSleepingListener(false));

      regionFactory2.create("testRegion");
      myCache = getCache();

      createAlertListener();
    });

    // now we have two caches set up. vm1 has a listener that will sleep
    // and cause the severe-alert threshold to be crossed

    region.put("bomb", "pow!"); // this will hang until vm1 responds
    disconnectAllFromDS();

    vm1.invoke(() -> {
      assertThat(alertReceived).isTrue();
    });
  }
Tests that a severe-level alert is generated if a member does not respond with an ack quickly
enough. vm0 and vm1 create a region and set ack-severe-alert-threshold. vm1 has a cache
listener in its region that sleeps when notified, forcing the operation to take longer than
ack-wait-threshold + ack-severe-alert-threshold
geode-core/src/distributedTest/java/org/apache/geode/distributed/internal/ClusterDistributionManagerDUnitTest.java