private static void delayQueryTestHook(final DefaultQuery.TestHook.SPOTS spot,
      final DefaultQuery query,
      final ExecutionContext executionContext) {
    if (spot != DefaultQuery.TestHook.SPOTS.BEFORE_QUERY_DEPENDENCY_COMPUTATION) {
      return;
    }
    if (query.isCqQuery()) {
      return;
    }

    /*
     * The pollDelay() value was chosen to be larger than the
     * GemFireCacheImpl.MAX_QUERY_EXECUTION_TIME (system property) value,
     * set during test initialization.
     */
    await("stall the query execution so that it gets cancelled")
        .pollDelay(10, TimeUnit.MILLISECONDS)
        .until(executionContext::isCanceled);
  }
This method is used as an implementation of the TestHook functional interface, to delay
query execution long enough for the QueryMonitor to mark the query as cancelled.
geode-cq/src/distributedTest/java/org/apache/geode/cache/query/dunit/QueryMonitorDUnitTest.java