@Override
      public void run() {
        // Query VERBOSE has to be true for the test
        assertTrue(QUERY_VERBOSE);

        // Get TestHook from observer.
        QueryObserver observer = getInstance();
        assertTrue(hasObserver());

        final IndexTrackingTestHook th =
            (IndexTrackingTestHook) ((IndexTrackingQueryObserver) observer).getTestHook();

        GeodeAwaitility.await().untilAsserted(new WaitCriterion() {

          @Override
          public boolean done() {
            if (th.getRegionMap() != null) {
              return th.getRegionMap().getResults() != null;
            }
            return false;
          }

          @Override
          public String description() {
            return null;
          }
        });

        IndexInfo regionMap = th.getRegionMap();

        Collection<Integer> rslts = regionMap.getResults().values();
        int totalResults = 0;
        for (Integer i : rslts) {
          totalResults += i;
        }

        getLogWriter().fine("Index Info result size is " + totalResults);
        assertEquals(results, totalResults);
      }
CReates a PR on a VM with NUM_BKTS buckets.
geode-core/src/distributedTest/java/org/apache/geode/cache/query/internal/index/IndexTrackingQueryObserverDUnitTest.java