@Override
    public void doTestHook(final SPOTS spot, final DefaultQuery _ignored,
        final ExecutionContext executionContext) {
      try {
        switch (spot) {
          case ATTEMPT_REMOVE:
            if (!readyToStartRemoveLatch.await(21, TimeUnit.SECONDS)) {
              throw new AssertionError("Time ran out waiting for other thread to initiate put");
            }
            break;
          case TRANSITIONED_FROM_REGION_ENTRY_TO_ELEMARRAY:
            readyToStartRemoveLatch.countDown();
            if (!waitForRemoveLatch.await(21, TimeUnit.SECONDS)) {
              throw new AssertionError("Time ran out waiting for other thread to initiate remove");
            }
            break;
          case BEGIN_REMOVE_FROM_ELEM_ARRAY:
            waitForRemoveLatch.countDown();
            if (waitForTransitioned.await(21, TimeUnit.SECONDS)) {
              throw new AssertionError(
                  "Time ran out waiting for transition from region entry to elem array");
            }
            break;
        }
      } catch (InterruptedException e) {
        throw new AssertionError("Interrupted while waiting for test to complete");
      }
    }
Tests race condition when we are transitioning index collection from elem array to concurrent
hash set The other thread could remove from the empty concurrent hash set. Instead we now set a
token, do all the puts into a collection and then unsets the token to the new collection
geode-core/src/integrationTest/java/org/apache/geode/cache/query/internal/index/CompactRangeIndexJUnitTest.java