DefaultProxyChainAnalyzer extends AbstractStartStoppable implements ProxyChainAnalyzer { @Override public ProxyChain getProxyChain(String backupDcId, String clusterId, String shardId) { return chains.get(new DcClusterShard(backupDcId, clusterId, shardId)); }  @Override ProxyChain getProxyChain(String backupDcId, String clusterId, String shardId); @Override ProxyChain getProxyChain(String tunnelId); @Override List<ProxyChain> getProxyChains(); @Override void addListener(Listener listener); @Override void removeListener(Listener listener); @VisibleForTesting DefaultProxyChainAnalyzer setProxyMonitorCollectorManager(ProxyMonitorCollectorManager proxyMonitorCollectorManager); @VisibleForTesting DefaultProxyChainAnalyzer setMetaCache(MetaCache metaCache); @VisibleForTesting DefaultProxyChainAnalyzer setExecutors(ExecutorService executors); @VisibleForTesting DefaultProxyChainAnalyzer setRouteService(RouteService routeService); @Override void isleader(); @Override void notLeader(); static final int ANALYZE_INTERVAL; }
@Test public void testGetProxyChain() { ProxyChain chain = analyzer.getProxyChain("FRA-AWS", "cluster", "shard"); Assert.assertNotNull(chain); logger.info("[chain] {}", chain); }
@Test public void testGetProxyChainUseTunnelId() { ProxyChain chain = analyzer.getProxyChain(manager.getProxyMonitorResults().get(0).getTunnelInfos().get(0).getTunnelId()); Assert.assertNotNull(chain); logger.info("[chain] {}", chain); }