@Test
  public void testDiskFullExcep() {
    int[] diskDirSizes = new int[4];
    diskDirSizes[0] = 2048 + 500;
    diskDirSizes[1] = 2048 + 500;
    diskDirSizes[2] = 2048 + 500;
    diskDirSizes[3] = 2048 + 500;

    DiskRegionProperties diskRegionProperties = new DiskRegionProperties();
    diskRegionProperties.setDiskDirsAndSizes(diskDirs, diskDirSizes);
    diskRegionProperties.setPersistBackup(true);
    diskRegionProperties.setRolling(false);
    diskRegionProperties.setMaxOplogSize(1000000000);

    DiskStoreFactory diskStoreFactory = toDiskStoreFactory(diskRegionProperties);

    createDiskStoreWithSizeInBytes(diskStoreName, diskStoreFactory, 1_000_000_000);

    Region<Object, Object> region =
        createRegion(regionName, diskStoreName, true, true, false, false, 0);

    int[] actualDiskDirSizes = ((InternalRegion) region).getDiskDirSizes();

    assertThat(actualDiskDirSizes[0]).isEqualTo(2048 + 500);
    assertThat(actualDiskDirSizes[1]).isEqualTo(2048 + 500);
    assertThat(actualDiskDirSizes[2]).isEqualTo(2048 + 500);
    assertThat(actualDiskDirSizes[3]).isEqualTo(2048 + 500);

    // we have room for 2 values per dir

    byte[] value = new byte[1024];
    Arrays.fill(value, (byte) 77);

    for (int i = 0; i < 8; i++) {
      region.put(String.valueOf(i), value);
    }

    // we should have put 2 values in each dir so the next one should not fit
    try (IgnoredException ie = addIgnoredException(DiskAccessException.class)) {
      Throwable thrown = catchThrowable(() -> region.put("FULL", value));
      assertThat(thrown).isInstanceOf(DiskAccessException.class);
    }

    verifyClosedDueToDiskAccessException(region);
  }
DiskRegDiskAccessExceptionTest : Disk region test for DiskAccessException.
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionJUnitTest.java