public static void checkServerCount(int expectedDeadServers, int expectedLiveServers) {
    final long maxWaitTime = 60000;
    long start = System.currentTimeMillis();
    for (;;) {
      if (pool.getConnectedServerCount() == expectedLiveServers) {
        break; // met
      }
      assertTrue(
          "Waited over " + maxWaitTime + "for active servers to become :" + expectedLiveServers,
          (System.currentTimeMillis() - start) < maxWaitTime);
      sleep(2000);
    }
  }
Wait for acknowledgment from client, verify creation time is correct
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/tier/sockets/ReliableMessagingDUnitTest.java