@Test
  public void testVersionsOnClientsWithNotificationsOnly() {
    // set notifyBySubscription=true to test register interest
    int serverPort1 = server1.invoke(() -> new ServerBuilder()
        .regionShortcut(PARTITION)
        .create());
    int serverPort2 = server2.invoke(() -> new ServerBuilder()
        .regionShortcut(PARTITION)
        .create());

    // set queueRedundancy=1
    client1.invoke(() -> new ClientBuilder()
        .serverPorts(serverPort1)
        .create());
    client2.invoke(() -> new ClientBuilder()
        .serverPorts(serverPort2)
        .subscriptionEnabled(true)
        .subscriptionRedundancy()
        .create());

    // client1 putAll
    client1.invoke(() -> {
      Region<String, TickerData> region = getClientCache().getRegion(regionName);
      doPutAll(region, "key-", ONE_HUNDRED * 2);
      assertThat(region.size()).isEqualTo(ONE_HUNDRED * 2);
    });

    // client2 versions collection
    client2.invoke(() -> {
      Region<String, TickerData> region = getClientCache().getRegion(regionName);
      region.registerInterest("ALL_KEYS");
    });

    // client1 versions collection
    List<VersionTag<?>> client1Versions = client1.invoke(() -> {
      Region<String, TickerData> region = getClientCache().getRegion(regionName);
      assertThat(region.size()).isEqualTo(ONE_HUNDRED * 2);

      RegionMap entries = ((DiskRecoveryStore) region).getRegionMap();
      List<VersionTag<?>> versions = new ArrayList<>();
      for (Object key : entries.keySet()) {
        RegionEntry regionEntry = entries.getEntry(key);
        VersionTag<?> tag = regionEntry.getVersionStamp().asVersionTag();
        versions.add(tag);
      }

      return versions;
    });

    // client2 versions collection
    List<VersionTag<?>> client2Versions = client2.invoke(() -> {
      Region<String, TickerData> region = getClientCache().getRegion(regionName);
      assertThat(region.size()).isEqualTo(ONE_HUNDRED * 2);

      RegionMap entries = ((DiskRecoveryStore) region).getRegionMap();
      List<VersionTag<?>> versions = new ArrayList<>();
      for (Object key : entries.keySet()) {
        RegionEntry regionEntry = entries.getEntry(key);
        VersionTag<?> tag = regionEntry.getVersionStamp().asVersionTag();
        versions.add(tag);
      }

      return versions;
    });

    assertThat(client1Versions.size()).isEqualTo(ONE_HUNDRED * 2);

    for (VersionTag<?> tag : client1Versions) {
      assertThat(client2Versions).contains(tag);
    }
  }
Tests while putAll to 2 distributed servers, one server failed over Add a listener to slow down
the processing of putAll
geode-cq/src/distributedTest/java/org/apache/geode/internal/cache/PutAllClientServerDistributedTest.java