@Test public void testDoCheckWithBiDirectionCluster() { this.mockClusterType = ClusterType.BI_DIRECTION; Mockito.when(metaCache.getXpipeMeta()).thenReturn(mockXpipeMeta()); sentinelConfigCheck.doCheck(); Mockito.verify(alertManager, Mockito.times(12)) .alert(Mockito.anyString(), Mockito.anyString(), Mockito.anyString(), Mockito.any(), Mockito.any(), Mockito.anyString()); }
protected void doCheck() { XpipeMeta xpipeMeta = metaCache.getXpipeMeta(); if (null == xpipeMeta) return; for (DcMeta dc: xpipeMeta.getDcs().values()) { List<DcClusterShard> clusterShards = findUnsafeClusterShardInDc(dc); alertForSentinelMissing(dc.getId(), clusterShards); } }
SentinelConfigCheck extends AbstractCrossDcIntervalCheck { protected void doCheck() { XpipeMeta xpipeMeta = metaCache.getXpipeMeta(); if (null == xpipeMeta) return; for (DcMeta dc: xpipeMeta.getDcs().values()) { List<DcClusterShard> clusterShards = findUnsafeClusterShardInDc(dc); alertForSentinelMissing(dc.getId(), clusterShards); } } }
SentinelConfigCheck extends AbstractCrossDcIntervalCheck { protected void doCheck() { XpipeMeta xpipeMeta = metaCache.getXpipeMeta(); if (null == xpipeMeta) return; for (DcMeta dc: xpipeMeta.getDcs().values()) { List<DcClusterShard> clusterShards = findUnsafeClusterShardInDc(dc); alertForSentinelMissing(dc.getId(), clusterShards); } }  }
SentinelConfigCheck extends AbstractCrossDcIntervalCheck { protected void doCheck() { XpipeMeta xpipeMeta = metaCache.getXpipeMeta(); if (null == xpipeMeta) return; for (DcMeta dc: xpipeMeta.getDcs().values()) { List<DcClusterShard> clusterShards = findUnsafeClusterShardInDc(dc); alertForSentinelMissing(dc.getId(), clusterShards); } }   }
SentinelConfigCheck extends AbstractCrossDcIntervalCheck { protected void doCheck() { XpipeMeta xpipeMeta = metaCache.getXpipeMeta(); if (null == xpipeMeta) return; for (DcMeta dc: xpipeMeta.getDcs().values()) { List<DcClusterShard> clusterShards = findUnsafeClusterShardInDc(dc); alertForSentinelMissing(dc.getId(), clusterShards); } }    }