@Override
        public void beforeProcessMessage(ClusterDistributionManager dm,
            DistributionMessage message) {
          if (message instanceof QueryMessage) {
            RebalanceOperation rebalance =
                cacheRule.getCache().getResourceManager().createRebalanceFactory().start();
            // wait for the rebalance
            try {
              REBALANCE_RESULTS.compareAndSet(null, rebalance.getResults());
            } catch (CancellationException | InterruptedException e) {
              errorCollector.addError(e);
            }
          }
        }
1. Buckets are created on several nodes <br>
2. A query is started 3. While the query is executing, several buckets are moved.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/PRQueryWithPdxDuringRebalanceRegressionTest.java