DefaultKeeperStateController extends AbstractLifecycle implements KeeperStateController, TopElement { @Override public void removeKeeper(KeeperTransMeta keeperTransMeta) { logger.info("[removeKeeper]{}", keeperTransMeta); KeeperContainerService keeperContainerService = getKeeperContainerService(keeperTransMeta); shardExecutor.execute(new Pair<>(keeperTransMeta.getClusterId(), keeperTransMeta.getShardId()), createDeleteKeeperCommand(keeperContainerService, keeperTransMeta, scheduled, removeKeeperSuccessTimeoutMilli)); }  @Override void addKeeper(KeeperTransMeta keeperTransMeta); @Override void removeKeeper(KeeperTransMeta keeperTransMeta); void setExecutors(ExecutorService executors);  }
@Test public void testDelete() throws TimeoutException { Assert.assertFalse(deleteCommand.isBeginExecute()); defaultKeeperStateController.removeKeeper(new KeeperTransMeta(getClusterId(), getShardId(), new KeeperMeta())); waitConditionUntilTimeOut(() -> deleteCommand.isBeginExecute(), 1000); }