public static Integer createServerCache() throws Exception {
    new HABugInPutDUnitTest().createCache(new Properties());
    AttributesFactory factory = new AttributesFactory();
    factory.setScope(Scope.DISTRIBUTED_ACK);
    factory.setDataPolicy(DataPolicy.REPLICATE);
    RegionAttributes attrs = factory.create();
    cache.createRegion(REGION_NAME, attrs);
    CacheServerImpl server = (CacheServerImpl) cache.addCacheServer();
    assertNotNull(server);
    int port = getRandomAvailableTCPPort();
    server.setPort(port);
    server.setNotifyBySubscription(false);
    server.start();
    return server.getPort();
  }
This Dunit test is to verify the bug in put() operation. When the put is invoked on the server
and NotifyBySubscription is false then it follows normal path and then again calls put of region
on which region queue is based. so recurssion is happening.
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/ha/HABugInPutDUnitTest.java