@Test
  public void testPROrderBy() throws Exception {
    Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);
    setCacheInVMs(vm0, vm1);

    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRAccessorCreate(name, redundancy,
        PortfolioData.class));

    vm0.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForLocalRegionCreation(localName,
        PortfolioData.class));
    vm1.invoke(prQueryDUnitHelper.getCacheSerializableRunnableForPRCreate(name, redundancy,
        Portfolio.class));

    vm1.invoke(new CacheSerializableRunnable("Adding portfolios") {
      @Override
      public void run2() {
        Cache cache = getCache();
        Region region = cache.getRegion(name);
        for (int i = 0; i < 100; i++) {
          region.put(i, new Portfolio(i));
        }
      }
    });

    vm1.invoke(() -> {
      QueryService qs = getCache().getQueryService();
      qs.createIndex("index", IndexType.FUNCTIONAL, "ID", SEPARATOR + name);
      for (int i = 0; i < 100; i++) {
        Query query = qs.newQuery(
            "SELECT DISTINCT * FROM " + SEPARATOR + name + " WHERE ID >= " + i
                + " ORDER BY ID asc LIMIT 1");
        SelectResults results = (SelectResults) query.execute();
        int expectedValue = i;
        for (Object o : results) {
          Portfolio p = (Portfolio) o;
          assertEquals(expectedValue++, p.getID());
        }
      }
    });
  }
1. Creates a PR and colocated child region Accessor and Data Store with redundantCopies = 0.

<p>
2. Populates the region with test data.

<p>
3. Fires a query on accessor VM and verifies the result.

<p>
4. Shuts down the caches, then restarts them asynchronously, but don't restart the child region

<p>
5. Attempt the query while the region offline because of the missing child region
geode-core/src/distributedTest/java/org/apache/geode/cache/query/partitioned/PRBasicQueryDUnitTest.java