@Override
  public boolean clearDefinedIndexes() {
    indexDefinitions.clear();
    return true;
  }
Close the CQ Service after clean up if any.
geode-core/src/main/java/org/apache/geode/cache/query/internal/DefaultQueryService.java