@Test
  @Repeat(20)
  public void testManyConnectsAndDisconnects() throws Exception {
    logger.info("Test run: {}", count);

    int numVMs = 4;
    VM[] vms = new VM[numVMs];

    for (int i = 0; i < numVMs; i++) {
      vms[i] = Host.getHost(0).getVM(i);
    }

    AsyncInvocation<?>[] asyncs = new AsyncInvocation[numVMs];
    for (int i = 0; i < numVMs; i++) {
      asyncs[i] = vms[i].invokeAsync(new SerializableRunnable("Create a cache") {
        @Override
        public void run() {
          getCache();
        }
      });
    }

    for (int i = 0; i < numVMs; i++) {
      asyncs[i].await();
    }
  }
This test creates 4 vms and starts a cache in each VM. If that doesn't hang, it destroys the DS
in all vms and recreates the cache.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ConnectDisconnectDUnitTest.java