@Override
    public void run() {
      for (int i = 0; i < iterations; i++) {
        Connection connection = borrow(i);
        try {
          Thread.sleep(10);
          doTask("Updater[" + id + "] loop[" + i + "] Someone else changed the connection flag",
              () -> haveConnection.compareAndSet(true, false));
        } catch (Throwable throwable) {
          errorCollector.addError(throwable);
          break;
        } finally {
          manager.returnConnection(connection);
        }
      }
    }
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