@Test
  public void diskAccessExceptionDuringGiiShouldShutdown() throws Exception {
    vm0.invoke(this::createCacheForVM0);
    vm1.invoke(this::createCacheForVM1);

    // Create DiskRegion locally in controller VM also
    DiskStoreFactory diskStoreFactory = getCache().createDiskStoreFactory();
    diskStoreFactory.setDiskDirs(controllerDiskDirs);

    DiskStore diskStore = diskStoreFactory.create(uniqueName);

    InternalRegionFactory factory = getCache().createInternalRegionFactory();
    factory.setScope(Scope.DISTRIBUTED_ACK);
    factory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE);
    factory.setDiskSynchronous(false);
    factory.setDiskStoreName(diskStore.getName());

    Region<Integer, Integer> region = factory.create(uniqueName);

    // Now put entries in the disk region
    for (int i = 0; i < 100; ++i) {
      region.put(i, i);
    }

    // Now close the region in the controller VM
    region.close();

    // Now recreate the region but set the factory such that disk region entry object
    // used is customized by us to throw exception while writing to disk

    DistributedRegion distributedRegion =
        new DistributedRegion(uniqueName, factory.getCreateAttributes(), null,
            getCache(),
            new InternalRegionArguments().setDestroyLockFlag(true).setRecreateFlag(false)
                .setSnapshotInputStream(null).setImageTarget(null),
            disabledClock());

    distributedRegion.entries.setEntryFactory(new DiskRegionEntryThrowsFactory());

    factory.setInternalMetaRegion(distributedRegion);
    factory.setDestroyLockFlag(true);
    factory.setSnapshotInputStream(null);
    factory.setImageTarget(null);

    assertThatThrownBy(() -> factory.create(uniqueName))
        .isInstanceOf(DiskAccessException.class);
  }
If the node experiences disk access exception during GII, it should get destroyed & not attempt
to recover from the disk
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/GiiDiskAccessExceptionRegressionTest.java