private Connection doBorrow(int i) throws Exception {
      AtomicReference<Connection> connection = new AtomicReference<>();

      long elapsedMillis = Timer.measure(() -> {
        connection.set(manager.borrowConnection(BORROW_TIMEOUT_MILLIS));

        doTask("Updater[" + id + "] loop[" + i + "] Someone else has the connection!",
            () -> haveConnection.compareAndSet(false, true));
      });

      doTask("Elapsed time (" + elapsedMillis + ") >= " + BORROW_TIMEOUT_MILLIS,
          () -> elapsedMillis < BORROW_TIMEOUT_MILLIS + ALLOWABLE_ERROR_IN_MILLIS);
      return connection.get();
    }
This tests that a deadlock between connection formation and connection pool closing has been
fixed. See GEODE-4615
geode-core/src/integrationTest/java/org/apache/geode/cache/client/internal/pooling/ConnectionManagerJUnitTest.java