@Test
  @Parameters({"disk1", "disk2"})
  @TestCaseName("{method}(childRegionDiskStore={0})")
  public void testRebalanceWithOfflineChildRegion(String childRegionDiskStore) throws Exception {
    // Create the PRs on two members
    for (VM vm : toArray(vm0, vm1)) {
      vm.invoke(() -> {
        createCache();
        createDiskStore(diskStoreName1);
        createPR_withPersistence(regionName, diskStoreName1, 0, DEFAULT_REDUNDANT_COPIES,
            DEFAULT_STARTUP_RECOVERY_DELAY);
      });
    }

    for (VM vm : toArray(vm0, vm1)) {
      vm.invoke(() -> createChildPR_withPersistence(regionName, childRegionName1,
          childRegionDiskStore, 0, DEFAULT_REDUNDANT_COPIES, DEFAULT_STARTUP_RECOVERY_DELAY));
    }

    // Create some buckets.
    vm0.invoke(() -> {
      createData(regionName, "a");
      createData(childRegionName1, "a");
    });

    // Close the members
    for (VM vm : toArray(vm1, vm0)) {
      vm.invoke(this::closeCache);
    }

    // Recreate the parent region. Try to make sure that the member with the latest copy of the
    // buckets is the one that decides to throw away it's copy by starting it last.

    for (VM vm : toArray(vm0, vm1)) {
      vm.invoke(() -> {
        createCache();
        createDiskStore(diskStoreName1);
        createPR_withPersistence(regionName, diskStoreName1, 0, DEFAULT_REDUNDANT_COPIES,
            DEFAULT_STARTUP_RECOVERY_DELAY);
      });
    }

    // Now create the parent region on vm-2. vm-2 did not previous host the child region.
    vm2.invoke(() -> {
      createCache();
      createDiskStore(diskStoreName1);
      createPR_withPersistence(regionName, diskStoreName1, 0, DEFAULT_REDUNDANT_COPIES,
          DEFAULT_STARTUP_RECOVERY_DELAY);
    });

    // Rebalance the parent region.
    // This should not move any buckets, because we haven't recovered the child region
    vm2.invoke(() -> {
      RebalanceResults rebalanceResults =
          getCache().getResourceManager().createRebalanceFactory().start().getResults();
      assertThat(rebalanceResults.getTotalBucketTransfersCompleted()).isZero();
    });

    // Recreate the child region.
    for (VM vm : toArray(vm0, vm1, vm2)) {
      addAsync(vm.invokeAsync(() -> createChildPR_withPersistence(regionName, childRegionName1,
          childRegionDiskStore, 0, DEFAULT_REDUNDANT_COPIES, DEFAULT_STARTUP_RECOVERY_DELAY)));
    }
    awaitAllAsync();

    vm0.invoke(() -> {
      // Validate the data
      validateData(regionName, "a");
      validateData(childRegionName1, "a");

      // Make sure we can actually use the buckets in the child region.
      createData(childRegionName1, "c");
    });
  }
Test what happens when we crash in the middle of satisfying redundancy for a colocated bucket.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/partitioned/PersistentColocatedPartitionedRegionDistributedTest.java