@Test
  public void testSameWALPrefix() throws IOException {
    String walName1 = "localhost,8080,12345-45678-Peer.34567";
    String walName2 = "localhost,8080,12345.56789";
    manager.postLogRoll(new Path(walName1));
    manager.postLogRoll(new Path(walName2));

    Set<String> latestWals =
      manager.getLastestPath().stream().map(Path::getName).collect(Collectors.toSet());
    assertThat(latestWals,
      Matchers.<Set<String>> both(hasSize(2)).and(hasItems(walName1, walName2)));
  }
Remove a peer and wait for it to get cleaned up
hbase-server/src/test/java/org/apache/hadoop/hbase/replication/regionserver/TestReplicationSourceManager.java