@Test
  public void testPutAllHoldersInEventTracker() {
    Host host = Host.getHost(0);
    VM vm0 = host.getVM(0);
    VM vm1 = host.getVM(1);
    VM vm2 = host.getVM(2);

    SerializableRunnable createRegion = new SerializableRunnable("createRegion") {

      @Override
      public void run() {
        Cache cache = getCache();
        RegionFactory<Object, Object> rf =
            cache.createRegionFactory(RegionShortcut.PARTITION_REDUNDANT);
        PartitionAttributesFactory paf = new PartitionAttributesFactory();
        paf.setRedundantCopies(1);
        paf.setTotalNumBuckets(3);
        rf.setPartitionAttributes(paf.create());
        rf.setConcurrencyChecksEnabled(true);
        rf.create("partitioned");

        rf = cache.createRegionFactory(RegionShortcut.REPLICATE);
        rf.setConcurrencyChecksEnabled(true);
        rf.create("replicate");
        try {
          startCacheServer();
        } catch (Exception ex) {
          Assert.fail("While starting CacheServer", ex);
        }
      }
    };

    vm0.invoke(createRegion);
    vm1.invoke(createRegion);

    // Create Create Region in the client
    final int port = vm0.invoke(EventTrackerDUnitTest::getCacheServerPort);
    final String hostName = NetworkUtils.getServerHostName(host);
    vm2.invoke(new CacheSerializableRunnable("Create client") {
      @Override
      public void run2() throws CacheException {
        getCache();
        AttributesFactory factory = new AttributesFactory();
        factory.setScope(Scope.LOCAL);
        ClientServerTestCase.configureConnectionPool(factory, hostName, port, -1, false, -1, -1,
            null);
        createRootRegion("partitioned", factory.create());
        createRootRegion("replicate", factory.create());
      }
    });

    doTwoPutAlls(vm2, "partitioned");
    doTwoPutAlls(vm2, "replicate");

    // Make sure that the event tracker for each bucket only records the last
    // event.
    checkBucketEventTracker(vm0, 0, 3);
    checkBucketEventTracker(vm1, 0, 3);
    checkBucketEventTracker(vm0, 1, 3);
    checkBucketEventTracker(vm1, 1, 3);
    checkBucketEventTracker(vm0, 2, 3);
    checkBucketEventTracker(vm1, 2, 3);

    checkReplicateEventTracker(vm0, 9);
    checkReplicateEventTracker(vm1, 9);
  }
Test to make sure we don't leak put all events in the event tracker after multiple putAlls
geode-core/src/distributedTest/java/org/apache/geode/internal/cache/event/EventTrackerDUnitTest.java