@Override
      public void run() {
        final GemFireCacheImpl cache = savedCache;
        GeodeAwaitility.await().untilAsserted(new WaitCriterion() {
          @Override
          public boolean done() {
            return cache.isReconnecting();
          }

          @Override
          public String description() {
            return "waiting for cache to begin reconnecting";
          }
        });
        out.println("entering reconnect wait for " + cache);
        try {
          cache.waitUntilReconnected(5, MINUTES);
        } catch (InterruptedException e) {
          fail("interrupted");
        }
        assertNotNull(cache.getReconnectedCache());
      }
auto-reconnect was found to stop attempting to reconnect and rebuild the cache if another
forced-disconnect was triggered after reconnect but before cache creation was completed. This
test uses a region listener to crash the reconnecting distributed system during cache creation
and asserts that it then reconnects and rebuilds the cache.
geode-core/src/distributedTest/java/org/apache/geode/cache30/ReconnectDUnitTest.java