@Test
  public void testIndexCreationDeadLockForDiskOnlyRegion() {
    region.destroyRegion();
    AttributesFactory factory = new AttributesFactory();
    factory.setScope(Scope.DISTRIBUTED_ACK);
    factory.setValueConstraint(Portfolio.class);
    factory.setDataPolicy(DataPolicy.PERSISTENT_REPLICATE);
    factory.setIndexMaintenanceSynchronous(true);
    File dir = new File("test");
    dir.mkdir();
    DiskStoreFactory dsf = region.getCache().createDiskStoreFactory();
    DiskStore ds1 = dsf.setDiskDirs(new File[] {dir}).create("ds1");
    factory.setDiskStoreName("ds1");
    dir.deleteOnExit();
    region = CacheUtils.createRegion("portfolios", factory.create(), true);
    simulateDeadlockScenario();
    assertFalse(cause, testFailed);
    assertFalse("Index creation failed", exceptionInCreatingIndex);
  }
Tests Index creation and maintenance deadlock scenario for Persistent only disk region
geode-core/src/integrationTest/java/org/apache/geode/cache/query/functional/IndexCreationDeadLockJUnitTest.java