@Test
  public void consistencyCheckerDisabledTest() throws Exception {
    // 1. only one participant, consistency checker should be disabled
    AmbryServer server =
        new AmbryServer(new VerifiableProperties(props), clusterAgentsFactory, notificationSystem, time);
    server.startup();
    assertNull("The mismatch metric should not be created", server.getServerMetrics().stoppedReplicasMismatchCount);
    server.shutdown();
    // 2. there are two participants but period of checker is zero, consistency checker should be disabled.
    props.setProperty("server.participants.consistency.checker.period.sec", Long.toString(0L));
    List<ClusterParticipant> participants = new ArrayList<>();
    for (int i = 0; i < 2; ++i) {
      participants.add(
          new MockClusterParticipant(Collections.emptyList(), Collections.emptyList(), Collections.emptyList(), null,
              null, null));
    }
    clusterAgentsFactory.setClusterParticipants(participants);
    server = new AmbryServer(new VerifiableProperties(props), clusterAgentsFactory, notificationSystem, time);
    server.startup();
    assertNull("The mismatch metric should not be created", server.getServerMetrics().stoppedReplicasMismatchCount);
    server.shutdown();
  }
Test that consistency checker should be disabled in some scenarios.
ambry-server/src/test/java/com/github/ambry/server/ParticipantsConsistencyTest.java