use of org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode in project ignite by apache.
the class CacheMetricsForClusterGroupSelfTest method testMetricsStatisticsEnabled.
/**
* Test cluster group metrics in case of statistics enabled.
*/
public void testMetricsStatisticsEnabled() throws Exception {
createCaches(true);
populateCacheData(cache1, ENTRY_CNT_CACHE1);
populateCacheData(cache2, ENTRY_CNT_CACHE2);
readCacheData(cache1, ENTRY_CNT_CACHE1);
readCacheData(cache2, ENTRY_CNT_CACHE2);
awaitMetricsUpdate();
Collection<ClusterNode> nodes = grid(0).cluster().forRemotes().nodes();
for (ClusterNode node : nodes) {
Map<Integer, CacheMetrics> metrics = ((TcpDiscoveryNode) node).cacheMetrics();
assertNotNull(metrics);
assertFalse(metrics.isEmpty());
}
assertMetrics(cache1);
assertMetrics(cache2);
destroyCaches();
}
Aggregations