public void closeClient(VM client) {
    SerializableRunnable closeCache = new CacheSerializableRunnable("Close Client") {
      @Override
      public void run2() throws CacheException {
        org.apache.geode.test.dunit.LogWriterUtils.getLogWriter().info("### Close Client. ###");
        try {
          closeCache();
          disconnectFromDS();
        } catch (Exception ex) {
          org.apache.geode.test.dunit.LogWriterUtils.getLogWriter()
              .info("### Failed to get close client. ###");
        }
      }
    };

    client.invoke(closeCache);
  }
Stops the cache server that serves up the given cache.
geode-cq/src/distributedTest/java/org/apache/geode/cache/query/dunit/PdxQueryCQTestBase.java