@Ignore
  @Test
  public void testRemoteTokenPersistIsDisabled() throws Exception {
    assumeTrue(purgeDeleteTombstone);
    refreshState(false, true, false);
    List<LogSegmentName> segmentsUnderCompaction = getLogSegments(0, 2);
    CompactionDetails details = new CompactionDetails(state.time.milliseconds(), segmentsUnderCompaction, null);
    List<MockReplicaId> localAndPeerReplicas = generateLocalAndPeerReplicas();
    ScheduledExecutorService scheduler = Utils.newScheduler(1, false);
    MockIdFactory keyFactory = new MockIdFactory();
    RemoteTokenTracker tokenTracker =
        new RemoteTokenTracker(localAndPeerReplicas.get(0), scheduler, keyFactory, state.time);
    // Try to start the persistor. But by default, storePersistRemoteTokenIntervalInSeconds is zero and won't start it.
    tokenTracker.start(config.storePersistRemoteTokenIntervalInSeconds);
    Map<String, Pair<Long, FindToken>> emptyTokens = tokenTracker.getPeerReplicaAndToken();

    // Generate one token
    StoreFindToken tombstoneToken = getTombstoneToken(0);
    // update token associated with peer replicas
    tokenTracker.updateTokenFromPeerReplica(tombstoneToken, localAndPeerReplicas.get(1).getDataNodeId().getHostname(),
        localAndPeerReplicas.get(1).getReplicaPath());
    tokenTracker.updateTokenFromPeerReplica(tombstoneToken, localAndPeerReplicas.get(2).getDataNodeId().getHostname(),
        localAndPeerReplicas.get(2).getReplicaPath());
    Map<String, Pair<Long, FindToken>> validTokens = tokenTracker.getPeerReplicaAndToken();
    tokenTracker.close();

    // start a new RemoteTokenTracker. It'll be empty tokens since we didn't persist it in the last run.
    tokenTracker = new RemoteTokenTracker(localAndPeerReplicas.get(0), scheduler, keyFactory, state.time);
    Map<String, Pair<Long, FindToken>> tokenAfter = tokenTracker.getPeerReplicaAndToken();

    // check the tokens
    for (Map.Entry<String, Pair<Long, FindToken>> entry : tokenAfter.entrySet()) {
      Pair<Long, FindToken> afterToken = entry.getValue();
      Pair<Long, FindToken> emptyToken = emptyTokens.get(entry.getKey());
      Pair<Long, FindToken> validToken = validTokens.get(entry.getKey());

      assertEquals(FindTokenType.Uninitialized, afterToken.getSecond().getType());
      assertEquals(FindTokenType.Uninitialized, emptyToken.getSecond().getType());
      assertEquals(tombstoneToken, validToken.getSecond());
      assertTrue(validToken.getFirst() >= emptyToken.getFirst());
      assertTrue(afterToken.getFirst() >= validToken.getFirst());
    }
  }
Test the remote token persistor is disabled by default
@throws Exception
ambry-store/src/test/java/com/github/ambry/store/BlobStoreCompactorTest.java