@Test
  public void doesNotWaitForPreviousInstanceOfOnlineServer() throws Exception {
    vm0.invoke(() -> {
      createPartitionedRegion(1, 0, 1, true);
      // Make sure we create a bucket
      createData(0, 1, "a", partitionedRegionName);
    });

    vm0.invoke(() -> {
      // notify controller and then wait to bounce
      DistributionMessageObserver.setInstance(new WaitToBounceWhenImageRequested());
    });

    addVMEventListener(vmEventListener);

    try (IgnoredException ie = addIgnoredException(PartitionOfflineException.class)) {
      // This should recover redundancy, which should cause vm0 to bounce/disconnect
      AsyncInvocation<Void> createPRAsync =
          vm1.invokeAsync(() -> createPartitionedRegion(1, 0, 1, true));

      beforeBounceLatch.await(TIMEOUT_MILLIS, MILLISECONDS);
      vm0.bounceForcibly();
      createPRAsync.await();

      // Make sure get a partition offline exception
      vm1.invoke(() -> {
        assertThatThrownBy(() -> createData(0, 1, "a", partitionedRegionName))
            .isInstanceOf(PartitionOfflineException.class);
      });
    }

    afterBounceLatch.await(TIMEOUT_MILLIS, MILLISECONDS);

    // This should recreate the bucket
    vm0.invoke(() -> createPartitionedRegion(1, 0, 1, true));

    vm1.invoke(() -> checkData(0, 1, "a", partitionedRegionName));
  }
RegressionTest for bug 42226. <br>
1. Member A has the bucket <br>
2. Member B starts creating the bucket. It tells member A that it hosts the bucket <br>
3. Member A crashes <br>
4. Member B destroys the bucket and throws a partition offline exception, because it wasn't
able to complete initialization. <br>
5. Member A recovers, and gets stuck waiting for member B.

<p>
TRAC 42226: recycled VM hangs during re-start while waiting for Partition to come online (after
Controller VM sees unexpected PartitionOffLineException while doing ops)
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/partitioned/PersistentPartitionHangsDuringRestartRegressionTest.java