public void waitForRegion(Region region, long timeout) throws InterruptedException {
      long start = System.currentTimeMillis();
      synchronized (this) {
        while (!recoveredRegions.contains(region)) {
          long remaining = timeout - (System.currentTimeMillis() - start);
          assertTrue("Timeout waiting for region recovery", remaining > 0);
          wait(remaining);
        }
      }
    }
Test for hang condition observed with the PRHARedundancyProvider.createMissingBuckets code.

A parent region is populated with buckets. Then the child region is created simultaneously on
several nodes.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/execute/PRColocationDUnitTest.java