DefaultSentinelManager implements SentinelManager { @Override public String infoSentinel(Sentinel sentinel) { SimpleObjectPool<NettyClient> clientPool = keyedClientPool .getKeyPool(new DefaultEndPoint(sentinel.getIp(), sentinel.getPort())); InfoCommand infoCommand = new InfoCommand(clientPool, InfoCommand.INFO_TYPE.SENTINEL, scheduled); infoCommand.setCommandTimeoutMilli(LONG_SENTINEL_COMMAND_TIMEOUT); silentCommand(infoCommand); try { return infoCommand.execute().get(); } catch (Exception e) { logger.error("[infoSentinel] " + sentinel, e); } return null; }  @Override void removeShardSentinelMonitors(ShardEvent shardEvent); @Override HostPort getMasterOfMonitor(Sentinel sentinel, String sentinelMonitorName); @Override void removeSentinelMonitor(Sentinel sentinel, String sentinelMonitorName); @Override String infoSentinel(Sentinel sentinel); @Override void monitorMaster(Sentinel sentinel, String sentinelMonitorName, HostPort master, int quorum); @Override List<HostPort> slaves(Sentinel sentinel, String sentinelMonitorName); @Override void reset(Sentinel sentinel, String sentinelMonitorName); @VisibleForTesting DefaultSentinelManager setScheduled(ScheduledExecutorService scheduled); @VisibleForTesting DefaultSentinelManager setKeyedClientPool(XpipeNettyClientKeyedObjectPool keyedClientPool);  }
@Test public void infoSentinel() throws Exception { String info = manager.infoSentinel(new Sentinel("test", "10.2.48.234", 5000)); logger.info("====================================="); SentinelMonitors.parseFromString(info).getMonitors().forEach(monitor -> logger.info(monitor)); logger.info("====================================="); }