@Override
      public void run() {
        locatorPort = locPort;
        final Properties props = getDistributedSystemProperties();
        props.put(MAX_WAIT_TIME_RECONNECT, "1000");
        dsProperties = props;
        ReconnectDUnitTest.savedSystem = getSystem(props);
        ReconnectDUnitTest.savedCache = (GemFireCacheImpl) getCache();
        Region myRegion = createRegion("myRegion", createAtts());
        myRegion.put("MyKey", "MyValue");
        myRegion.getAttributesMutator()
            .addCacheListener(new CacheListenerTriggeringForcedDisconnect());
      }
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