@Test
  public void testBridgeServerRunningInSyncPersistOnlyForIOExceptionCase() throws Exception {
    DiskRegionProperties diskRegionProperties = new DiskRegionProperties();
    diskRegionProperties.setRegionName(regionName);
    diskRegionProperties.setOverflow(true);
    diskRegionProperties.setRolling(true);
    diskRegionProperties.setDiskDirs(diskDirs);
    diskRegionProperties.setPersistBackup(true);
    diskRegionProperties.setMaxOplogSize(100000); // just needs to be bigger than 65550

    DiskStoreFactory diskStoreFactory = toDiskStoreFactory(diskRegionProperties);

    createDiskStoreWithSizeInBytes(diskStoreName, diskStoreFactory, 100_000);

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

    CacheServer cacheServer = cache.addCacheServer();
    cacheServer.setPort(0);
    cacheServer.start();

    region.create("key1", new byte[16]);
    region.create("key2", new byte[16]);

    // Get the oplog file path
    UninterruptibleFileChannel oplogFileChannel =
        getDiskRegion(region).testHook_getChild().getFileChannel();

    // corrupt the opfile
    oplogFileChannel.position(2);
    ByteBuffer byteBuffer = ByteBuffer.allocate(416);
    for (int i = 0; i < 5; ++i) {
      byteBuffer.putInt(i);
    }
    byteBuffer.flip();

    // Corrupt the oplogFile
    oplogFileChannel.write(byteBuffer);

    // Close the region
    region.close();
    assertThat(region.isDestroyed()).isTrue();

    Throwable thrown = catchThrowable(() -> createRegion(regionName, diskStoreName, true, true,
        false, true, DEFAULT_ENTRIES_MAXIMUM));
    assertThat(thrown).isInstanceOf(DiskAccessException.class);

    List cacheServers = cache.getCacheServers();
    assertThat(cacheServers).isNotEmpty();
  }
If IOException occurs while initializing a region, then the cache servers should not be
stopped
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/DiskRegionJUnitTest.java