@Test
public void testClusterInfoServiceCollectsInformation() throws Exception {
createIndex("test");
ensureGreen("test");
Thread.sleep(2000); // wait 2 seconds for new information to be gathered
InternalTestCluster internalTestCluster = internalCluster();
// Get the cluster info service on the master node
ClusterInfoService infoService = internalTestCluster.getInstance(ClusterInfoService.class, internalTestCluster.getMasterName());
ClusterInfo info = infoService.getClusterInfo();
Map<String, DiskUsage> usages = info.getNodeDiskUsages();
Map<String, Long> shardSizes = info.getShardSizes();
assertNotNull(usages);
assertNotNull(shardSizes);