@Override
      public void run2() throws CacheException {
        Region region = getCache().getRegion(regionName);

        while (!hooked) {
          Wait.pause(100);
        }
        if (hooked) {
          hooked = false;
          IndexManager.testHook = null;
          region.clear();
        }

        try {
          QueryService qservice = getCache().getQueryService();
          Index index = qservice.getIndex(region, "idIndex");
          if (((CompactRangeIndex) index).getIndexStorage().size() > 1) {
            fail(
                "After clear region size is supposed to be zero as all index updates are blocked. Current region size is: "
                    + region.size());
          }
        } finally {
          IndexManager.testHook = null;
        }
      }
This tests if index updates are blocked while region.clear() is called and indexes are being
reinitialized.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/internal/index/ConcurrentIndexInitOnOverflowRegionDUnitTest.java